cmux NEXT composer: Return steers a running turn, ⌘Return queues
Leo asked for steer by default, as in Claude Code desktop. The installed nightly still said "↵ to queue, ⌘↵ to steer", and Return queued behind the running turn.
What changes (agent pane composer, webviews only)
- For an agent that steers (
summary.steering, which is every claude-stdio chat), Return while a turn runs steers: the prompt goes into the running turn, and the agent reads it when its current step ends. Nothing is cancelled. This works in the chat composer, the Quick Composer, and with only attachments staged. - ⌘Return queues the prompt for after the turn.
- Placeholder while a turn runs: "↵ steer · ⌘↵ queue". The Quick Composer (its ⌘Return opens the window) and an attachments-only prompt say "Steer this turn…".
- Tooltips: the Send button, which queues mid-turn, now names ⌘Return (
composer.queueLaterTooltip). The steer control now names Return. - Agents that can't steer keep their current keys: Return queues, ⌘Return stops the turn and sends.
- Strings:
composer.placeholderSteeris reworded, andcomposer.placeholderSteerQuickandcomposer.queueLaterTooltipare new. All are translated into the catalog's 21 locales (stateneeds_review, like the strings next to them).
Coordinated: composer-polish (#22667) leaves the running-turn placeholder and keys to this PR. Its agentPane.sendWhileRunning setting will rebase onto the returnSteers boolean here. prompt-queue-edit (#22736) is fixing the acpmux side, so every claude-stdio session reports steering=true after a daemon restart. Until that lands, an adopted chat whose steering is false keeps the old keys. Follow-up from this lane: the pending-steer marker, plus a "Send now" button that interrupts.
Tests
bun test test/composer-queued-placeholder.test.tsx. Commit 1 (f7c32b78) is red on base: Return sentsteer: false, ⌘Return sentsteer: true, and the placeholder read "↵ to queue, ⌘↵ to steer". Commit 2 makes it green: 9 pass. It also covers non-steering agents keeping Return to queue and ⌘Return to interrupt.
Behavior changes to dogfood
- Option-Return used to add a line through WebKit's default. Now it sends or steers like Return. Shift-Return still adds a line.
- Dictation's "new line" / "new paragraph" voice commands probably arrive as
insertParagraph/insertLineBreak, so they would send the half-dictated prompt. If dogfood shows that, narrow thebeforeinputcatch to a Return right after a keyCode 229 keydown.
Observed / Not run
- Ran: the bun test above (9 pass),
vp fmtandoxlinton the changed files. - Independent review subagent: PASS (read-only).
- CI on 3e60472e: the only red is
cmux-next guards / defaults-snapshot, which is red the same way on feat-cmux-next runs (39529089308, 39528884211). - Not run locally: the full
bun run check(type check, layer checks) and the browser lanes. Leo's Mac is at load ~30, and git in the shared checkout is wedged, so I committed from a fresh clone without the pre-push hook. CI's web lint and react-apps-check cover them. - Not dogfooded in a build yet.
Changelog
- Changed: In agent chats, Return while the agent is working now steers the running turn (it reads your message when its current step ends); ⌘Return queues the message for after the turn.
🤖 Generated with Claude Code
Agent session: cosmic-gray
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Makes steering the default while an agent's turn runs, matching Claude Code desktop. Return sends the prompt into the running turn (the agent reads it when its current step ends, nothing is cancelled), and ⌘Return queues the prompt for after the turn.
- Works in the chat composer, the Quick Composer, and with only attachments staged.
- Nothing sent stops a turn anymore: agents that can't steer queue on both keys and have no Interrupt control.
- Placeholder while a turn runs is "↵ steer · ⌘↵ queue" ("Steer this turn…" in the Quick Composer), and the Send button's tooltip names ⌘Return for queueing.
- New and reworded strings are translated into the catalog's 21 locales.
- Return never adds a line, even when an input method or Dictation passes it on as keyCode 229: the paragraph input sends or steers instead, and Shift-Return is unchanged.