Skip to content

Carry attachments through a mid-run steer #48

Description

@mariohercules

Problem

When a message arrives while a run is live, the steer path forwards only text. src/api/app-turn.ts:302-303 builds steerText from req.text alone, and the run consumes only s.text (src/runs/run-signal-store.ts:80). The full request is attached to the signal but is read only by orphan replay after the run has died (src/api/app-helpers.ts:484-505).

Two user-visible results:

  • A message with a caption and a file steers the caption; the file is never seen by the run.
  • A message with a file and no caption is dropped entirely. routeWake returns drop: "empty-mid-turn" (src/wake/wake.ts:28-30) while app-turn.ts:348 still reports steered: true, so the Slack handler stands down and posts nothing.

The second case is the common one, because it is what the agent itself asks for: the agent says "send me the screenshot", the user pastes the image with no caption while the run is still working, the file is downloaded and staged (src/slack/turn-handler.ts:393-402), and then nothing happens. No reply, ever.

test/wake-steering.test.ts:110 asserts the empty-mid-turn drop only for whitespace-only text with no attachments, so this case is not covered.

Expected behavior

A message sent mid-run reaches the run with its attachments, and a message that carries only attachments is never treated as empty.

Acceptance criteria

  • A mid-run message with attachments delivers those attachments to the live run.
  • An attachment-only mid-run message is not dropped as empty.
  • A message that genuinely carries no content is still dropped, as today.
  • Tests cover the attachment-only and caption-plus-attachment mid-run cases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions