Repository navigation
acpmux: restore older Claude chat history after restart - #28098
Conversation
…script #27740 seeded an adopted or watched Claude Code chat with its transcript's newest page and a native_history cursor nothing read. _acpmux/native_history reads the page before a cursor (adopt_replay_page.rs, same caps) and returns its turns as the records adopting logs, numbered below 1, with the next cursor. The pane pages them in once the log's own history is held, and an older daemon or host just stops the paging. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-062eab5f69c0c07fd08e
… land Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-062eab5f69c0c07fd08e
…r that serves none is never asked Review (codex gpt-6-astra): a Web client could read the transcript, an older peer's refusal read as an error to retry, and a paged native turn offered a Fork acpmux cannot do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-062eab5f69c0c07fd08e
|
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)
Gallery before/after for
States
Pick other states with a Passes: CI passes on CI passes on Written by web and size checks: green Shipped in:
|
|
Owned by an agent session · session |
|
Found 6 test failures on Blacksmith runners: Failures
|
|
Review (codex gpt-6.1-sol high fast, independent): BLOCK at d3c1460 (raw first pass; its P1 is refuted below, so treat the net as not yet confirmed SHIP) Sol reviewed the diff only (no checkout). Its findings:
Not found by Sol: races, lost or duplicated pages, waitLogs:false never loading logs, older-peer handling, or remote-guard gaps. It had no checkout, so none of that was run. Fast-gates (run 41029289350, dispatched on feat-cmux-next with pr=28098): see the lane message for its conclusion. |
…tory-fix # Conflicts: # webviews/src/agent-session/acpmux/direct.ts
|
Review (Codex gpt-6-astra; independent delta): SHIP at 57408a5 The hand-resolved base integration preserves native-history behavior, base turn identifiers, and the queue/config restoration fixes. No actionable findings. |
…tory-fix # Conflicts: # cmux-tui/crates/acpmux/src/server/requests.rs
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. |
|
Review (Codex): SHIP at 750f0eb No actionable defects found in either parent diff or the affected integration. Both feature flags survive; fast attach, queue/config restoration, bounded native-history paging, and negative-sequence guards remain intact. Visual verdict: Yes—Leo would accept the shown layout next to ChatGPT/Claude. Opened and inspected Read-only source review and scoped |
|
Review (Codex gpt-6-astra; independent delta): SHIP at 86cbd1d No correctness findings in 713f2d3..86cbd1d. Guarded accesses preserve response-size accounting and omission selection; marker semantics, event identity/order, cursor continuation fields, and mutable borrow lifetimes remain intact. |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo asked: “I can't fing scroll up past the current fing turn after restarting, and I still don't see the fing left side session scroll prompts thing. ... the scroll up thing was because it still took thirty fing seconds to load anything.”
After a restart, adopted Claude chats now expose the transcript cursor recorded in acpmux and page older turns once the seeded session log is exhausted. Native transcript pages use bounded cursors, fold whole turns above the visible history, preserve the scroll anchor, and stop cleanly on older daemons or unsupported peers. This carries the implementation from draft #27982 into an owned lane because its owner is dead.
Before: the pane stopped at the newest log-seeded page, so older turns were unavailable after restart.
After: the pane reads older transcript pages on demand and shows every prior turn while keeping the reader's place.
Before/after synthetic Linux captures (same restarted adopted chat, newest answer visible):
No capture: the native Swift change only allows the history RPC and its parameters through the relay; it changes no native rendering. The web transcript behavior is captured below on revision 39aad15 in the Linux harness.
I viewed the after image above: the transcript is readable, aligned, and leaves the composer unobstructed. The independent reviewer also opened it and accepted the layout alongside ChatGPT/Claude. This is the synthetic capture from revision 39aad15, not a new capture of the latest integration.
Performance
Same synthetic Linux Playwright harness and build, one sample per mode: 700 transcript turns, 200 seeded turns, 500,000 raw log records. Each sample starts a fresh browser after restarting its fixture daemon. Before omits
waitLogs; after sendswaitLogs:false.A repeated run of the same harness (five samples per mode) measured a median of about 1.87 s before and 0.27 s after (about 85% faster): head run 41068764032. At the merge base, both modes took 1,827–1,991 ms: base run 41068759544.
This isolates the attach wait on the same build. It measures DOM detection after navigation and daemon readiness, not pixel paint or full restart wall time. Both samples had no page errors; the captures use synthetic content.
Validation at 750f0eb: web passed all 10 history/scroll/queue/config regressions, typecheck, and lint; fast gates passed. The daemon library run passed 2,382 tests with zero failures and five ignored. Independent Codex integration review passed at this exact head, including both parent diffs and visual inspection of the accepted after image. Fleet Swift results are being checked against base per failing test.
Cursor marks use file identity, observed length, and a bounded boundary hash. Validation and paging share one open descriptor. Exact persisted unmarked seeds have an upgrade path; arbitrary unissued unmarked offsets are rejected. The sampled boundary does not fingerprint arbitrary rewrites elsewhere in the file. Restored held prompts publish a queue change to already attached clients. Native reply pages reduce their turn count to fit the RPC budget; an indivisible oversized turn uses explicit omission markers for payloads that cannot fit, while retaining the continuation cursor. No repeating timer was added; older-history reads stop at cursor zero and the existing selection-generation/epoch checks discard stale responses.
Agent session: agent session