agent pane: a chat's reasoning survives a relaunch
Start a chat on Low, move it to High, then quit with Keep Sessions and reopen cmux NEXT: the chat's reasoning chip says Low, and the Reasoning menu checks Low. acpmux still runs the session on High.
When a chat page attaches, acpmux's _acpmux/attach answers with the session as it runs now (session.configOptions: effort high) and a page of its history. The client set its summary from the session and then replayed the history through reduceEvent. The history's only config_option_update is the one from when the chat started (low), so it overwrote the current value. Any option changed after a chat started came back on its start value whenever the page was rebuilt: a relaunch, or a hidden page that hibernation released.
The client now keeps the seq the summary's options are current as of: attach's lastSeq, then each newer config update. A replayed update at or before it is history and is skipped. A live update after the attach still applies. acpmux logs a config update's event before it writes the session's options, so an attach between the two names the old options with that event as its lastSeq. Only events before lastSeq are skipped, so that event still applies (review follow-up). An older acpmux that sends no configOptions on the session behaves as before.
Found in a click-through pass on cmux16 (tagged build of feat-cmux-next c25d784). acpmux's own attach for the chat answered session effort high with one replayed config_option_update (seq 32) of low; the page drew Low.
Verification
bun test test/attach-config-current.test.ts: fails on e7af05fd4e8 (showslow), passes with the fix (showshigh, then a later livemedium). The follow-up test, where attach names the old options with the change as its last event, fails with<=and passes with<.bun test test/agent-pane-*.test.ts test/model-*.test.tsx test/transcript-newest-last.test.ts test/new-chat-effort-chip.test.ts test/retry-model.test.tsx test/ultracode-rides-effort.test.tsx: 53 pass, 41 skip (browser lane), 0 fail.bun run typecheck: no errors.- Full
bun testin one process: 843 pass / 31 fail with the fix, 842 / 33 without it. Those failures are files that pass alone (signed-out-harness,new-tab-send-button,new-tab-picker-foldall pass on their own) and fail when the whole suite shares one process, before and after this change. - Live: On cmux16, a tagged build of
feat-cmux-nextc25d784 with #21677, #21685, #21688, #21733 and #21729 merged locally (acpmux swapped in from that tree, since this host can't buildcmux-tuiwithout zig):scripts/cmux-next/clickthrough-live.py(#21729) passes "after a relaunch a chat keeps the reasoning it was moved to" (Sonnet 5.5 · High after Quit and Keep Sessions and a relaunch).
Changelog
Fixed: a chat keeps the reasoning level you picked after a relaunch, instead of showing the level it started on.
🤖 Generated with Claude Code