cmux-next: review Claude Code and Codex handoffs in agent chat

Merged
TE
1mo ago
+7685-638

Claude Code and Codex can continue a repository task in the other harness through Continue in… in the palette or agent pane header. The target chat's first message holds the editable capsule, manual checkpoint attestation, approved memory references, and separate context coverage and native-policy labels. Start submits that message; discard returns to the source without a confirmation sheet.

The pane uses daemon-owned handoffs, revision checks, stable retry keys, and the daemon-advertised UTF-8 capsule budget. It hides handoff controls until initialize advertises all five methods. Native policy and unverified host isolation are reported per session.

The agreed catalog names are agentPane.continueIn for the GUI wrapper, chat.handoff.{prepare,get,draft,start,discard} for pane actions, and _acpmux/handoff_{prepare,get,draft,start,discard} for RPCs. The headless path is the daemon's cmux acp continue verb. The GUI wrapper's CLI/MCP exemption is explicit in the action catalog; headless callers use the daemon contract without selecting or focusing a pane.

This PR owns the native action, localized handshake labels, browser client, inline review, and header chooser. The acpmux/CLI implementation is a coordinated dependency after the merged #16766 on #16174. Its schema head will be pinned when that PR is available. Source sessions remain intact; prepare sends no prompt. On an uncertain reply, the client reads the saved record before replaying the same key. Reconnecting starts with a recovery read.

Validation: 75 focused frontend tests and 228 assertions passed; the final input-validation change also passed its 5-test focused suite. The full webview check passes without formatting, lint or type errors. Swift syntax and bundle freshness pass. The mock browser tour covers both entrypoints, checkpoint attestation, approved memory references, start, reverse-direction prepare, and discard. All 36 new native labels cover 21 locales.

Exact-head validation at 71bdcaaa77b: hosted Release compilation passed, 3,515 native package tests and the separate 127-test suite passed. All 606 frontend tests passed locally with 2,261 assertions; the full webview check and 27 focused handoff/shortcut tests passed. Independent review approved this head.

Remaining hosted reds are audited base failures: three unchanged namespace violations in StatusPolicies, HomeBench and HomeStrings and their downstream iOS gate; a missing cached compiler module in untouched C code; and three assertions in unchanged WebKit navigation edge tests. Earlier hosted frontend observer failures in unchanged code did not reproduce on either the base or current branch.

The controls remain hidden pending the coordinated handoff daemon and schema pin. Live dirty-repository dogfood in both directions follows the daemon and bundling build; mock captures do not establish live harness behavior.

Changelog

Added: Continue Claude Code and Codex tasks in another harness with an inline context and checkpoint review.

Mock browser interaction captures:

Inline review from Claude Code to Codex

Reverse handoff review

Tour observations