You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(runtime): a steer submitted during a tool-free turn is never injected — the agent loop only drains steering at a tool-call boundary #3529
A steer typed during a turn that ends without another tool call is never injected. The turn finishes normally, the model never sees the interjection, and the queue entry is left unpulled.
AiSdkBackend drains steering only at the top of each agentLoop iteration:
So the only injection points in a turn are its tool-call boundaries. A steer that arrives during the last step — or during the only step of a plain conversational answer — has no boundary left and is silently skipped. Whether "Steer" works at all therefore depends on whether the model happens to call a tool afterwards, which the user cannot know when they press Enter.
The fake backend does not share this shape: it drains between chunks and once after the last chunk, commented "Final stranded drain (grok-build safety): a steer that landed after the last boundary still lands in this turn instead of being lost" (packages/runtime/src/test-only/fake-backend.ts ~275, ~291). That safety net is why the existing suites are green.
Downstream, the unpulled entry is folded to followup at the terminal transition, which currently poisons the Host — filed separately as #3530. This issue is only about the missing injection point.
How to reproduce
Drive AiSdkBackend directly with a pullSteering that yields nothing on the first call and a message from the second call onward — the real timing of pressing Enter after the turn has started streaming — and run the same input against a text-only model and a tool-then-text model:
Identical steering timing; the only variable is whether the model called a tool.
In the TUI the user-visible sequence is: type during a plain answer, see the Steering: bar, then the interjection never reaches the model. (Confirmed by asking the model afterwards what the user had said.)
Environment
Maka commit: d472a359b
OS: Windows 11 (26200); also reproduced under WSL
Surface: TUI against Runtime Host
Node.js: v22.18.0
Logs, screenshots, or additional context
Note that the lease is neither acked nor nacked — it is not rejected, just never looked at.
A fix does not need a protocol change. drainSteeringInto already performs pull, injection and ack; giving the loop one more chance to call it before break agentLoop, and continuing when it injected something, keeps the message in the turn the user aimed it at. stepLimitReached already bounds that path.
Activity
shaokeyibb commentedon Aug 22, 2026
I'm working on this.
fix(runtime): give a late steer an injection point in the turn it was…