[Bug] Queued steering message is parked forever after Escape interrupts the turn #1476
ruttybob
started this conversation in
Bug reports
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Affected area: TUI / Agent core
What happened?
When a steering message is queued during an agent turn and the user then presses Escape, the session appears to hang: the turn is interrupted, but the queued message is never delivered and nothing further happens automatically.
Looking at the code, this is a parked queue with no affordance:
next_turn_boundarylane,AgentSession.steer()), and the TUI shows the queued preview while streaming.requestAbort(), which suspends the session input pump. The queue is preserved, but the only things that resume it are submitting a new message (Enter) or editing the queue (the queued-message browser, which callsresumeQueuedWork()).Upstream pi handles this deliberately: its Escape handler (
interactive-mode.ts,onEscape→restoreQueuedMessagesToEditor) clears both queues, puts the queued texts back into the editor joined with blank lines, and only then aborts. So in pi, Escape means "stop and give me my draft back".Steps to reproduce
Expected behavior
Unclear — that is the point of this discussion. The candidates I see:
1 queued (steering) · Enter to send · <key> to edit— and Enter on an empty editor sends the parked queue instead of being a no-op.C feels closest to Prime Agent's design (durable, inspectable queue), B is closest to upstream pi, and A matches what programmatic aborts already do (queues drain on continue). Curious which direction maintainers prefer; happy to prototype any of them.
Prime Agent version: 0.7.2 (source, dev build)
Environment: macOS 15, zsh + tmux
Additional context
packages/coding-agent/src/modes/interactive/interactive-mode.tsonEscape→restoreQueuedMessagesToEditor({ abort: true })(queue cleared before abort, so no auto-continue).All reactions