Repository navigation
Chief: read a paged acpmux session list whole - #28297
Conversation
acpmux answers `_acpmux/sessions` and `_acpmux/watch` with no `limit` in pages, each with the `nextCursor` of the rest, when the whole list is too large for one message. A fake daemon answers in two pages: the link comes up on both, a session only the second page lists is found, and a cursor the daemon answers with again is refused. These fail on the Chief as it is, which reads the first page only. 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. |
acpmux answers `_acpmux/sessions` and `_acpmux/watch` with no `limit` in byte-bounded pages, each with the `nextCursor` of the rest, when the whole list is too large for one message. The Chief read only the first page. One helper, `whole_list`, now reads every page by `_acpmux/sessions` with the same params (less the watch's `enabled`) from each cursor and joins the rows; a cursor that comes again is refused so it never loops, and a call with a `limit` stays one request. The link's watch, `sessions()` and the bounded list in agents.rs all go through it. A list that fits is one reply with no cursor, so older daemons work unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-c11d09c9f41988fc1d93
|
Found 2 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 |
|
@lawrencecchen for awareness, since you have the most recent commits on these Chief paths ( Separately, |
|
Review (Codex gpt-6-astra, high, independent): SHIP at 952bc60. It found nothing to fix: every |
|
Chief rule 2, the failing test by name on base itself: Cause: |
|
Chief rule 2 at 952bc60: every failing check, compared by test name against base. This PR changes only
The other Chief rules at this head:
|
…-chief-clients-pages
|
Chief rule 2 at the new head c97a42e (base 49cba34 merged in; the PR's own diff is unchanged, patch-id 203ff031): every failing check, compared by test name against base. The earlier classification at 952bc60 doesn't hold: that run's
The Astra SHIP at 952bc60 carries over by patch-id: the PR's own change is the same three |
|
Fresh-home launch of
Screenshot withheld: the pr-media privacy check or upload refused it.
|
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Problem
acpmux #28182 answers
_acpmux/sessionsand_acpmux/watchwith nolimitin byte-bounded pages when the whole list is over its largest message (~14 MiB): the first page carries anextCursor, and the rest is read with_acpmux/sessions {cursor, ...same params}. One daemon's list was 17 MB with tools and was refused asmessage.too_large. The Chief's Rust client reads only the first reply, so against a paging daemon it would come up on part of the list and miss sessions on later pages (its own leftover turn and compactor sessions, a peer's sessionfind/sessionfall back to the list for).What changed
optchat-chief/src/acpmux.rs: one helper,whole_list, reads every page (the reference is acpmux'sClient::whole_listin acpmux: a session list too large for one message goes in pages #28182): with nolimitit followsnextCursorby_acpmux/sessionswith the same params less the watch'senabled, and joinssessions. A cursor that comes again is refused with an error, so a bad daemon never loops it. With alimit, one plain request. A list that fits is one reply with no cursor, so older daemons work unchanged._acpmux/sessions/_acpmux/watchcall in optchat-chief without alimitgoes through it: the link's watch,sessions()(the list fallback forsession/findandagents), andagents.rs's boundedsessions_bounded(each page keeps its 1 s bound).tests/acpmux_session_info.rsadds a fake daemon that answers in two pages (the_link_comes_up_on_every_page_of_the_watch_list,a_session_on_a_later_page_of_the_list_is_found,a_cursor_that_comes_again_is_refused);src/acpmux.rsadds a unit test that a list with alimitis one request.The test commit comes first; the fix follows.
Red / green
Linux fast checks (
cargo test --no-fail-fastof the wholeoptchat-chiefcrate):the_link_comes_up_on_every_page_of_the_watch_list(left: ["s-1"], the link came up on page one only),a_session_on_a_later_page_of_the_list_is_found(listed on page two: not found),a_cursor_that_comes_again_is_refused(unwrap_err()onOk(None)). One more fails:harness::the_chiefs_turn_and_compactor_sessions_carry_cmux_chief_and_children_do_not(harness.rs:445,left: 5).whole_list_testsunit test. One binary fails,--test harness, on the same test.Failing tests at the head, compared by name with the base:
harness::the_chiefs_turn_and_compactor_sessions_carry_cmux_chief_and_children_do_notleft: 5 right: 4left: 5 right: 4(run 41050748089, tested tree 943c5e5b = the merge-base's tree; the only failure of 28 in--test harness)cmux.chief.participantin #27935 and the test still counts 4; this PR touches neitherNo crash, signal or cut-short run in either run.
No capture: no UI change.
Observed / Not run
Observed: the red and green Linux runs above, and the base run of the harness test. Fresh-home launch at the head 952bc60 on a fleet Mac (build b0d14eaaee6d99eb3f453260): PASSED. Home in 6.4 s, up 30 s, no crash; the Chief thread "Chief - Main - This Mac" is listed and its intro rendered, with no error banner (run with --no-status, so no commit status was posted). An independent Codex (gpt-6-astra, high) review of 4a0b8f0..952bc60 gave
VERDICT: SHIP, with no findings.Not run: a run against a real daemon that pages (#28182 landed after these tests ran).
Changelog
Agent session: agent session
🤖 Generated with Claude Code