cmux NEXT: support inline /btw side questions

TE
10d ago
+1414-157

What changed

Leo, 2026-10-24: “we need to support /btw”.

The composer needs /btw <question> while the main turn is running. The answer stays attached to the ask in a small dismissible aside and never becomes a steer, queued prompt, or main-turn message.

This adds inline /btw for every harness:

  • Claude Code sends the native side_question control request through the running stream-json process.
  • Codex and other harnesses use a bounded, one-shot read-only fork in the same cwd and current model, then discard it on success, refusal, or timeout.
  • The composer reserves /btw in slash completion, preserves legacy split side-chat callers, and keeps attachment drafts intact.
  • The transcript aside is session-bound, anchored near the ask, localized, accessible, and dismissible.

Fixes #24872

Validation

  • bun test test/btw-notes.test.ts test/cmux-command-btw.test.ts test/header-state-side-sessions.test.ts — 7 passed.
  • Chromium browser lane previously passed 6 tests / 20 assertions on the feature path; the post-review recursive-side regression was added but its rerun hit the shared Vite warm-up timeout (no feature assertion failure).
  • Gallery build bun run gallery:build; Chromium gallery matrix at exact head 5b558714a269ac9143e1e1ce70402a3b44ce48d9: before, answered light/dark, pending, failed, Arabic, and dismissible states mounted with no overflow or errors (play status pass/warn only).
  • scripts/web-lint.sh --base cf59385454b7187747e750ac207feffb7ec12a7c --new-only — passed; inherited base findings reported by the helper.
  • python3 scripts/cmux-next/prepush-gate.py --base cf59385454b7187747e750ac207feffb7ec12a7c --head 5b558714a269ac9143e1e1ce70402a3b44ce48d9 — no new violations.
  • cargo fmt --all -- --check, git diff --check, and Swift syntax verification passed.
  • Focused Rust test was attempted but the repository heavy-build guard blocked native cargo test on Big Red (receipt 8443c02a7d023125); no cargo-test green claim.

The full web check still reports existing base design-token/layer/text-focus/type findings; the new-only lint gate confirms this change adds none.

pr-overlap reported five hot-file overlaps (#24335, #24272, #24293, #24223, #24468), all unrelated translator/inspector features; no /btw implementation overlap was found.

agent-identity footer
Agent session: big-red

Gallery evidence

Exact-head Chromium gallery captures from agent-pane.btw-aside (5b558714a269ac9143e1e1ce70402a3b44ce48d9):

Before / after (dark):

before dark 640 en
answered dark 640 en

Light theme after:

answered light 640 en