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
v0.9.14: runtime API steer receipts claim delivery the engine never made — item.completed emitted unconditionally, dropped steers reported as sent #6276
Steering is the user's only way to redirect a running turn. Today the runtime API reports a steer as delivered before the engine decides, and the engine can silently drop it — so a client tells the user "Guidance sent", clears their composer, and their words never reach the model. Input silently lost.
Current behavior
crates/tui/src/runtime_threads.rs:9575steer_turn: reserves channel capacity, persists the steer item as already Completed, then spawn_steer_receipts (runtime_threads.rs:8890) emits turn.steered + item.completed unconditionally — the code comment says "after engine acceptance" but no acceptance check exists.
Engine side: crates/tui/src/core/engine.rs:1285next_turn_steer drains the channel and discards any steer whose turn has moved on; turn-loop interrupt/failure paths drop pending_steers (turn_loop.rs:48, :809, :2074).
GPUI client steering a running turn (Enter while active turn): the app showed its sent-confirmation and cleared the composer; the model never received the text mid-turn, and the durable record still shows the steer item completed. Session: 6453856f-10b5-4a9b-947c-dcac902071d3.
Desired behavior
The engine reports each steer's real outcome (committed into the turn's record vs dropped).
steer_turn settles the item truthfully: Completed only on commit; dropped steers settle as canceled/not-delivered with an event, and the API returns a typed error (e.g. 409 turn-moved-on) so clients can requeue instead of trusting a lie.
Invariant (grokbuild's interjection tests in refs/grokbuild PTY suites): user guidance either reaches the model or is visibly returned — never silently dropped.
Acceptance criteria
Regression test: steer accepted into the channel, turn ends before the engine commits it → API returns the typed drop error (or truthful not-delivered receipt); noturn.steered/item.completed success events for it
Steer committed at a step boundary still produces item.completed (existing happy path preserved, test green)
Focused cargo test -p codewhale-tui --lib --locked green for runtime_threads steer tests
Why this matters
Steering is the user's only way to redirect a running turn. Today the runtime API reports a steer as delivered before the engine decides, and the engine can silently drop it — so a client tells the user "Guidance sent", clears their composer, and their words never reach the model. Input silently lost.
Current behavior
crates/tui/src/runtime_threads.rs:9575steer_turn: reserves channel capacity, persists the steer item as alreadyCompleted, thenspawn_steer_receipts(runtime_threads.rs:8890) emitsturn.steered+item.completedunconditionally — the code comment says "after engine acceptance" but no acceptance check exists.crates/tui/src/core/engine.rs:1285next_turn_steerdrains the channel and discards any steer whose turn has moved on; turn-loop interrupt/failure paths droppending_steers(turn_loop.rs:48,:809,:2074).Repro (live)
GPUI client steering a running turn (Enter while active turn): the app showed its sent-confirmation and cleared the composer; the model never received the text mid-turn, and the durable record still shows the steer item completed. Session:
6453856f-10b5-4a9b-947c-dcac902071d3.Desired behavior
steer_turnsettles the item truthfully:Completedonly on commit; dropped steers settle as canceled/not-delivered with an event, and the API returns a typed error (e.g. 409 turn-moved-on) so clients can requeue instead of trusting a lie.refs/grokbuildPTY suites): user guidance either reaches the model or is visibly returned — never silently dropped.Acceptance criteria
turn.steered/item.completedsuccess events for ititem.completed(existing happy path preserved, test green)cargo test -p codewhale-tui --lib --lockedgreen for runtime_threads steer testsRelated