acpmux clients (Rust): read a paged session list whole
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/sessions and _acpmux/watch with no limit answer such a list in byte-bounded pages: the first rows with a nextCursor, 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.- Tests:
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 test at the PR head. The red run used the test commit alone and the green run used the fix.
bash scripts/ci/init-submodule.sh ghostty-next && ./scripts/install-zig-ci.sh
(cd cmux-tui && cargo test -p cmux-tui-core --lib session_children)
(cd cmux-next-ios/rust && cargo test -p cmux-mobile-host notify_waiting)
- Red at d42891e0fe4 (tests only): https://github.com/manaflow-ai/cmux/actions/runs/41040507069. All three new tests fail. The two cmux-tui-core tests time out waiting for the
_acpmux/sessions {cursor}frame, and the mobile-host test fails its first-page assertion. The 16 existing tests in the filter pass. - Green at a417b33fe45 (fix): https://github.com/manaflow-ai/cmux/actions/runs/41040613716. cmux-tui-core 9/9 and mobile-host 10/10 pass. The job shows as failed only because the command ends in
exit 1so that its log prints.
Observed / Not run
- Observed: the runs above.
rustfmt --checkis clean on every changed file. - Not run: a live daemon with #28182 and a list past one reply. Clippy and the full cmux-tui suite are left to this PR's CI.
Changelog
none
Agent session: agent session
š¤ Generated with Claude Code