debug.agent_pane: compose_send and run_mode start a new chat on Cloud through the composer
Leo, 2026-10-31: "whenever i start a chat it should be able to send me to cloud autommatically keep launching/downloading new dev builds and such". Done means running that flow in a DEV build and reading the reply, so a capture has to start a new chat on Cloud the way a person does.
Why
The capture verbs could pick a folder (pick_folder) and send (send_prompt), but send_prompt goes straight to chat.send. A new chat with Cloud picked only reaches cloud.startChat through the composer's own send (App.tsx onSend -> sendToCloud), so no scripted run could start a Cloud chat from the composer.
Change (DEBUG automation only)
debug.agent_panecompose_send {text}: puts the text in the composer and sends it as Return does (ComposerHandle.restore+send). Whatever the composer shows decides where it goes: this Mac, Sandboxed, or Cloud. It answers{sent, runMode, cloudStart}; a Cloud start answerssent: falsewhile the composer holds the prompt until the chat opens on the machine.debug.agent_panerun_mode {mode?}: reads the new chat's run place, or pickspersistent,sandboxedorcloudas the run row's click does (sandboxModeRows.onMode). It refuses when the composer offers no run place.- Both are user verbs (
DebugAgentPane.userVerbs), so they get the same gesture record assend_promptandpick_folder.
Nothing changes outside DEBUG automation: the verbs exist only on window.cmuxAcpmuxDebug, which only DEBUG and bench builds call.
Tests
webviews/test/agent-pane-automation-compose-send.test.ts: a send goes through the composer and reports Cloud and the start; an unknown mode, a composer with no run place, no composer and an empty prompt are refused.bun teston that file and onagent-pane-automation-waits-for-chat.test.ts, plusbun run typecheck, on the fleet: 8 pass, no type errors.
Used by the Cloud start capture state (cmuxterm-hq, cloudFixture.project) that proves the flow end to end.
Agent session: agent session
š¤ Generated with Claude Code