Repository navigation
cmux NEXT: a chat's composer chips and shell command come back after a relaunch - #22790
Conversation
… a relaunch (red) AgentPaneWakeState (attachments, shell mode with its unrun command, the transcript's place) lives only in AgentTabStore.wakeStates, in memory, so Restart to Update, SIGTERM's Quit and keep sessions and Cmd-Q drop it. The test saves what a live and a released chat page hold through the quit's seam and expects the next run's first pages to get it back with their handshake, once. The seam (AgentPaneWakeStateFile, relaunchWakeStates, restoreWakeStates) is stubbed here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray
…a relaunch The quit's window step, which every relaunch's quit runs (Restart to Update, SIGTERM's Quit and keep sessions, Cmd-Q), now asks each live chat page what it holds that acpmux does not (pane.wakeState, at once, each within a second), adds the released pages' kept states, and saves them in agent-pane-wake-states.json beside the launch snapshot. The tab store reads the file once at launch and removes it; each tab's first page gets its state with its handshake, as a woken hibernated page does. A tab over 16 MiB of attachments is not kept, and the file stops at 64 MiB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by web and size checks: green |
|
Bead |
…, and cap at 8 MiB Review follow-up: a tab gone from every tree keeps nothing, a page built but not yet handshaken keeps the state it was built with, and the file the launch reads on the main actor is capped at 8 MiB (4 MiB per tab). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
…eep their composer (red) Review findings on #22790: a restored New Tab page adopts the prewarmed spare, whose handshake is past, so its kept chips never reach it and stay in the store; a live page that does not answer pane.wakeState in time, or that had only a reconnect handshake, saves nothing over the state it was built with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray
…low-ai/cmux into cmux/relaunch-view-restore
…ges and slow pages keep it - The wake file and its collection move to CmuxNextAgentPane (AgentPaneRelaunchWake), and AgentUnsentDrafts moves there with it, so CmuxNextApp shrinks (SW14, check-app-size) and keeps only the wiring. - A restored New Tab page with a kept composer gets its own page instead of the prewarmed spare, whose handshake is past. - At quit a page that has not taken its state (no ready yet) keeps it unasked, and a page that does not answer in time keeps the tab's held state or the one its ready took (AgentPaneModel.handedWake). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray
|
owner: 01a15c01-a42d-7970-a4a7-2f0ac203c940 |
|
Found 1 test failure on Blacksmith runners: Failure
|
…r AgentUnsentDrafts AgentUnsentDrafts moved to CmuxNextAgentPane in 86da2d5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray
…nd depends on handedWake Review of #22790: "reconnect" decoded as unsupported, so no handshake ran; and the test put the held state back after ready, so it passed without handedWake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray
…nd depends on handedWake Review of #22790: "reconnect" decoded as unsupported, so no handshake ran; and the test put the held state back after ready, so it passed without handedWake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray
…nd depends on handedWake Review of #22790: "reconnect" decoded as unsupported, so no handshake ran; and the test put the held state back after ready, so it passed without handedWake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray
…nd depends on handedWake (#22908) Review of #22790: "reconnect" decoded as unsupported, so no handshake ran; and the test put the held state back after ready, so it passed without handedWake. Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c01-a42d-7970-a4a7-2f0ac203c940&host=cosmic-gray Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Shipped in:
|
|
Shipped in:
|
Leo, 2026-10-20: "After nightlies, have the things running, but have the views go back to where they were."
After a relaunch, an agent chat's composer now comes back with its attached images and files and its unrun shell-mode command. Before this, that state (
AgentPaneWakeState) lived only in memory, inAgentTabStore.wakeStates, which hibernation fills when it releases a hidden chat page. So every relaunch dropped it: Restart to Update, SIGTERM's Quit and keep sessions (tonight's 17:51 relaunch), and Cmd-Q.There is one save path for every kind of relaunch: the quit's
prepareWindowsstep, which all three run. It asks each live chat page forpane.wakeState. The pages are asked all at once, each within 1 s, and the ask only reads. A page still loading keeps the state it was built with, and released pages' kept states are added. The result is written toagent-pane-wake-states.jsonbeside the launch snapshot. Tabs that are no longer in any tree are dropped. Each tab can hold at most 4 MiB and the file at most 8 MiB, keeping the smallest tabs first. At launch the tab store reads the file once and deletes it, and each tab's first page gets its state with itsreadyhandshake, the same way a woken hibernated page does. The file holds attachment contents as plain JSON in the tag's state directory, next to the existing launch images.What else is restored today (audit)
personalprojection (WindowRecordSaver), flushed inprepareForTerminationWindowRecordWindowRecord/ sidebar docAgentUnsentDraftsagent-scroll-anchors.json(chat.scrollAnchor)agent-pane-images/launch imagesChangelog
Fixed: Agent chats keep their attached images and files and an unrun shell command across an app relaunch or update.
Tests
cmux-ci run --class light --script scripts/ci/package-test-lane.sh --arg suite --arg Packages/macOS/CmuxNext --arg <suites> --ref <sha>aChatsComposerComesBackAfterARelaunch: "the live chat came back without its composer".anEmptyComposerLeavesNoFile: "a held shell command was not saved".AgentPaneRelaunchWakeTestspassed (9 s),AgentPageHibernationTestspassed (17 s),UnsentDraftTestspassed (1 s).Observed / Not run
Observed: the fleet red and green runs above, and
python3 scripts/cmux-next/prepush-gate.pywith no new violations on every push. An independent review subagent passed it with nits; the nits are fixed in af8744b (prune closed tabs, keep a loading page's state, lower the size caps).Not run: a real relaunch of a tagged build (Restart to Update or SIGTERM) with chips in a composer, so the page-side
wakeapply after a relaunch is covered only by the existing hibernation path, not seen live. No app build was made on the Mac.🤖 Generated with Claude Code
Agent session: cosmic-gray