Collapse queue/steer into one gesture, add stop-and-reinject, stop discarding queued input on interrupt - #431
Merged
TheGreatAxios merged 1 commit intoAug 9, 2026
Conversation
… and stop discarding queued input on interrupt
Plain Enter and Alt+Enter both waited for a turn boundary before delivering,
so an operator had two gestures with the same effect and no way to tell them
apart. Alt+Enter now hard-stops the run and restarts from the typed message
without waiting for a boundary; plain Enter always queues to steer at the
next boundary, and the transcript row says so plainly ([will steer next] /
[steering]) instead of leaving the operator to infer it from a badge count.
Interrupting used to discard every queued and steered message ("interrupt —
discarded N pending"). An operator who queued an instruction and then lost
patience was destroying the thing they were trying to deliver. Interrupt no
longer clears the queue; it reports what will steer the next run instead.
Verified live: Shift+Enter does insert a newline, but only on a terminal
that negotiates the kitty keyboard protocol (this app requests it); on a
plain terminal Enter and Shift+Enter send the same bare \r, so the chord is
silently a no-op there. Ctrl+Enter/Ctrl+J remain the newline chord that
works everywhere, and the shortcut list's existing wording already reflects
that condition rather than promising it unconditionally.
Both interrupt paths close the underlying agent, which cascades an abort
into any in-flight sub-agent dispatch (task-tool.ts forwards the parent's
operation signal into the child's own controller) — redirecting the parent
stops the fleet it dispatched too, not just its own turn. Documented in
docs/TUI.md.
TheGreatAxios
force-pushed
the
cl-5763-steering-is-broken-two-bindings-do-the-same-thing
branch
from
August 9, 2026 06:25
c75f4d6 to
1e5af67
Compare
Collaborator
Author
|
Merged. Rebased onto post-#430 main so steering and interrupt delivery share one model:
Transcript rows label pending intent; sub-agent abort-on-parent-redirect stays documented. CI snow flake (CL-5766) left alone — not this PR’s surface. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CL-5763: three defects in the mid-run send/steer/interrupt bindings.
[will steer next],[steering],[restarted here]) instead of leaving the operator to infer intent from a badge count.interrupt — discarded N pending; it now reportsinterrupt — N queued message(s) will steer the next run, and those messages survive to steer whatever run starts next.The chord check
Drove Shift+Enter through a live shell (tmux) rather than trusting the doc or the report. It does insert a newline, but only on a terminal that negotiates the kitty keyboard protocol (this app requests it via
useKittyKeyboard); on a plain terminal Enter and Shift+Enter send the same bare\r, so the chord is a silent no-op there — which is what the operator saw. The shortcut list's existing wording ("Shift+Enter also works on terminals that report the modifier") already states that condition rather than promising it unconditionally, so it wasn't changed. Ctrl+Enter/Ctrl+J remain the newline chord guaranteed to work everywhere.Sub-agent lanes on redirect
Both interrupt paths (Ctrl+C and Alt+Enter) close the underlying agent. That cascades: closing aborts the shared operation signal the
tasktool was given, which the tool forwards into the child agent's own controller, so an in-flight sub-agent dispatch is aborted along with the parent's turn and reports back as cancelled by the operator rather than running to completion detached. Decision: redirecting the parent stops the fleet it dispatched too — there is no path today to redirect the parent while leaving running lanes alone. Documented indocs/TUI.md.Verified live (tmux)
[will steer next], then[steering]once delivered at the boundary.interrupt — 1 queued message will steer the next run, badge stayed at 1, no discard. Sent a new idle message afterward and watched the surviving item steer into the new run as[steering].sleep 8tool call was in flight — sawstop — restarting from your messageand[restarted here] ..., the run stopped immediately, and a new run started from the reinjected message without waiting for the sleep to finish.Test plan
bun run typecheckbun run buildbun run test— 4277 pass, 0 failkeybindings.test.ts(the chord-through-a-live-shell suite) updated: Enter/Alt+Enter/Ctrl+C/Ctrl+G probes cover the new kinds; Ctrl+C probe also asserts a queued item survives a bridge-less local interruptsession-queue.test.ts,runtime-bridge.test.ts,shell.test.tsupdated for the new interrupt/reinject semantics