Skip to content

Steer sent during Claude run startup becomes the turn's prompt and reorders messages #32975

Closed

Description

@matthias-scale

Summary

A steer sent while a Claude run is still starting can arrive before the run's own user message. The Claude CLI then treats the steer as the turn's prompt, and the original user message is put back in the queue and handled mid-turn. The two messages swap order with no error, so the agent answers them in the wrong order.

This is different from #23271. There the steer is refused with No running provider turn found. Here it is accepted, but delivered too early.

Environment

  • 0.1.7-nightly.20261101.4048, Linux server, web client
  • Provider claudeAgent, model claude-opus-5-5
  • The resumed CLI runs SessionStart hooks (here after a manual /compact), which takes about 1–3 s before it reads the first prompt

Steps to reproduce

  1. Use a Claude thread whose CLI session has SessionStart hooks, so startup takes a moment (resuming after /compact makes this likely).
  2. Send message A. A new run starts.
  3. Within about 1 s, before the first provider event for that run, send message B with Steer (it is dispatched with priority: "now").

Expected

A is the turn's prompt. B is steered in after the CLI has started working on A.

Actual

B is written to the CLI's input before the CLI has picked up A. The CLI uses B as the turn's prompt, and A is re-queued and only reaches the agent later in the turn. From the thread's events: A's run started, B's steer was dispatched about 1 s later while the CLI was still running its SessionStart hooks, then the first assistant output answered B, and A showed up as a queued follow-up mid-turn.

Suggested fix

Don't send a priority: "now" steer to a Claude session until the CLI has accepted the run's first prompt (for example, wait for the first provider event of the active turn, and hold or queue the steer until then). That would also give #23271 one clear rule for the startup gap.

Related

Activity

  1. juliusmarminge commented on Nov 8, 2026

    @juliusmarminge
    Member

    Thanks for the detailed timeline. This is the same defect as #22531 ("Claude startup steer overtakes the opening prompt"): a steer sent before the run's opening prompt reaches the model is offered to the Claude CLI with priority: "now", so the CLI answers the steer first and runs A afterwards.

    Checked on current main: steerTurn in apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts still offers every steer with priority: "now" once the turn is active, with nothing that waits for the opening prompt. https://git.cafe/pingdotgg/t3code/issues/22531 is open and accepted, and it has adapter-level regression tests attached. Your SessionStart-hook case (resume after /compact) is another way to open the same startup window as the cold resume described there.

    Closing as a duplicate of #22531. Please follow that issue for the fix.

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