acpmux: _acpmux/sessions takes peer and status filters (paged), for the sidebar's Older row
Leo, 2026-10-24, word for word: "the whole ACP MUX thing, like that, it should just be able to show me, say on my sidebar, right? Like we already discussed this, like with the cloud icon, the group where, you know, on a different machine or whatever, there's the other agent sessions, the other workspaces running, but you guys aren't doing that yet."
Follow-up to #24950. The sidebar's machine groups count and list only live chats. The coordinator's note: "closed and archived ones go behind an 'Older' row, capped and paged". The peers hold about 1,175 closed sessions, and the only way to read them was the whole _acpmux/sessions list (about 9 MB here).
Summary
_acpmux/sessions(and the page of_acpmux/watch, which sharessession_list_reply) takes two optional filters:peer(only that acpmux peer's sessions) andstatus(only that status, e.g.closed).- The filters apply before keyset paging, so
limit/cursorpage through one machine's closed chats. - With no filter the reply is unchanged. An empty filter means no filter (as the schema allows); a non-string one is refused.
_acpmux/watchrefusespeerandstatuswith invalid params. Its events cover every session, so a filtered first page would promise a scope the events don't keep.SessionsParams(schema,deny_unknown_fields) gains both fields. The spec IR and the web types (acpmux-protocol:codegen) are regenerated.- The regenerated IR also includes a
titleSourcefield (with itsdefault: null) that #24985 added to the schema without blessing the IR, soprotocol_ir_is_currentwas red on base for that reason too.
The sidebar's Older row comes in a separate PR that uses this.
Testing
hub::session_pages::tests(unit, 4): filters before paging with a cursor; each filter alone; an empty filter is none; a watch refuses filters.- Fleet at
fa77c01:cmux-tui-rust-check.sh all session_pages(fmt, clippy, 4/4 tests) andtest protocol_ir_is_currentboth passed. - Review: Codex gpt-6-astra xhigh. BLOCK (watch scope, empty strings), both fixed, then SHIP at
fa77c01.
No capture: daemon protocol only, no UI.
Risk: normal. The change is additive and optional request parameters only, with the read path's behavior unchanged when they're absent. No socket or relay policy changes.
Changelog
Changed: acpmux's session list can be narrowed to one machine and one status.
Agent session: cosmic-gray
š¤ Generated with Claude Code