Repository navigation
acpmux clients (Rust): read a paged session list whole - #28273
Conversation
acpmux answers `_acpmux/sessions` and `_acpmux/watch` with no `limit` in byte-bounded pages with a `nextCursor` when the whole list is over its largest reply. These tests fail today: agent-session-children lists only the first page, the attach's watch misses a child only a later page names, and the phone push watch never asks for the rest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-c11d09c9f41988fc1d93
acpmux (#28182) answers `_acpmux/sessions` and `_acpmux/watch` with no `limit` in byte-bounded pages with a `nextCursor` once the whole list is over its largest reply, instead of refusing it as message.too_large. A list that fits is one reply with no cursor, so these clients work unchanged against an older acpmux. - AcpmuxLink::call_whole_list mirrors acpmux's Client::whole_list: with a `limit` it is one call; else it follows `nextCursor` through `_acpmux/sessions` with the same params less `enabled`, concatenating `sessions`. - agent-session-children, the attach's watch (the children it follows) and agent update's plan read their list through it. - The phone push watch asks for each next page by its cursor and loads and observes every page's rows; a failed page reconnects the watch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-c11d09c9f41988fc1d93
|
Found 3 test failures on Blacksmith runners: Failures
|
|
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)
web and size checks: green Shipped in:
|
…repeated cursor and a page with no sessions call_whole_list (cmux-tui-core) joined acpmux's byte pages without restoring newest-first order, so the 256-entry caps in session children and attach tracking could drop newer descendants. It also stopped silently at a non-string cursor, looped on a repeated one, and took a page with no sessions array for whole. It now does what acpmux's Client::whole_list does. The mobile host's watch paging (Waiting::next_page) refuses the same bad pages, so the watch reconnects instead of paging forever or passing a partial list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-c11d09c9f41988fc1d93
…own error Review follow-ups on reading acpmux's paged session lists whole: - LinkError::BadList replaces the made-up Rpc refusal, so children and agent update report agent_session.bad_list / agent_update.bad_list instead of 'acpmux refused the request' (documented in spec/commands.md); - an attach whose watch list comes in bad pages is refused, rather than following only some descendants and losing the rest's changes; - an _acpmux/sessions reply with no sessions array fails too (a watch reply from before watches had one is taken as before); - the mobile host's watch page has a 60 s deadline, past which the watch reconnects, like its info lookups; - the children fixture carries updatedAt, and its paged fake serves the older rows first, as byte pages can, so the test checks the sort. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-c11d09c9f41988fc1d93
…-rust-clients-pages
…t not whole
call_whole_list passed a continuation page's own error (a refusal, a
timeout, a closed link) up as it was, so the attach, which refuses only a
BadList, went on with the first page alone and followed none of its
descendants. A failed page past the first is now BadList too ('acpmux's
session list could not be read whole'); the first page's error is the
call's as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c11d09c9f41988fc1d93
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 gpt-6.1-sol xhigh, next-review): SHIP at 17ee908 SHIP at 17ee908 Visual verdict: no images; Leo tries the build
Source review completed. Rust tests could not run because this box has neither Follow-ups:
|
A newer verdict blocks b26524d (no independent SHIP at the head).
|
Review (next-review patch-id; carried): SHIP at b26524d The independent SHIP at 17ee908 carries to this head: the PR's own change ( |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Problem
On 2026-10-30 one daemon's session list with tools was 17 MB, past acpmux's largest reply, and acpmux refused it as
message.too_large. #28182 makes_acpmux/sessionsand_acpmux/watchwith nolimitanswer such a list in byte-bounded pages: the first rows with anextCursor, the rest from_acpmux/sessions {cursor, ...the same params less enabled}. The in-repo Rust clients that ask for the whole list read only the first reply, so against a paged daemon they would see only the first page.A list that fits is still one reply with no cursor, so these clients behave as before against an older acpmux.
What changed
cmux-tui/crates/cmux-tui-core/src/server/agent_session_link.rs:AcpmuxLink::call_whole_listdoes what acpmux'sClient::whole_listdoes. With alimitit makes one plain call, since that caller pages for itself. Otherwise it followsnextCursorthrough_acpmux/sessionswith the same params lessenabledand appends each page'ssessions.timeoutbounds each reply.agent_session_children.rs(agent-session-children),agent_session_stream.rs(the attach's_acpmux/watch, whose list picks the children the attachment follows) andagent_transfer/agent_update.rs(the update plan's chat list) read their lists through it. The watch's first page and its cursor pages are merged beforedescendant_idsreads them.cmux-next-ios/rust/crates/cmux-mobile-host/src/notify_waiting.rs: the phone push watch asks for each next page by its cursor. The classifier loads every page's rows and each row is observed. A failed page reconnects the watch, which reads the list again from its start.notify.rs: doc comment only.agent_chat_notices.rsalready pages with alimitand is unchanged.agent_session_attach_tests.rsgives the fake acpmux a two-page_acpmux/sessionsand a two-page watch.session_children_reads_every_page_of_a_list_too_big_for_one_replyandsession_children_follows_a_child_only_a_later_watch_page_namescover cmux-tui-core.a_watch_list_past_one_reply_reads_its_rest_from_the_cursorcovers mobile-host.Tests
Red/green are both on hosted Linux through
cmux-ci testat the PR head. The red run used the test commit alone and the green run used the fix._acpmux/sessions {cursor}frame, and the mobile-host test fails its first-page assertion. The 16 existing tests in the filter pass.exit 1so that its log prints.Observed / Not run
rustfmt --checkis clean on every changed file.Changelog
none
Agent session: agent session
🤖 Generated with Claude Code