agent pane: a chat's attach and older pages carry maxBytes again (cx-b08ei)

Merged
TE
22d ago
+55-5

Summary

Opening any chat in the agent pane is refused by the host, so the chat tab stays blank and never binds to its session (cx-b08ei). #20536 (cx-2lv1k) made the page cap _acpmux/attach (opening a chat) and _acpmux/events (paging older turns in) with maxBytes, but the host's params rule (AcpmuxPaneMethods.knownParams) never learned the key. AgentPaneTransport refuses every such frame with transport.intent_invalid. On DEV builds of current feat, the page's ACP log shows:

out request _acpmux/attach {"sessionId":"…","limit":400,"maxBytes":131072,…}
in  error   _acpmux/attach {"code":-32601,"message":"Refused by the cmux host","data":{"origin":"native","code":"transport.intent_invalid"}}

This adds maxBytes to both methods' params, in AcpmuxPaneMethods+Params.swift and in the shared pane policy (cmux-agent-pane-policy/policy.json) so the Rust host's lists stay the same. acpmux already reads maxBytes on both (server/requests.rs).

Testing

AgentPaneOpenPageRelayTests sends the page's exact attach and older-page frames (as direct.ts attach() and fetchOlder()) through AgentPaneTransport to an acpmux stand-in.

  • Red, at cf5efbd9 (test only): scripts/ci/run-swift-testing-suites.sh Packages/macOS/CmuxNext on the fleet. AgentPaneOpenPageRelayTests FAILED: "the pane refused a chat's opening page". It was the only failing suite.
  • Green, at 845a38a5: the same run, all 303 suites PASS. The step's exit 1 is the runner's could not lock config file .git/modules/ghostty/config after the tests.
  • Release compile (scripts/cmux-next/check-release-compile.sh) at 845a38a5 on the fleet: BUILD SUCCEEDED.

Not run: a live DEV build of this branch. The live repro is the open-beside and tile-subagents real-chat e2e runs that hit the refusal on dc3f0e26-based builds; they will be re-run once this lands. The policy crate change is data only; its Rust tests are left to the hosted lanes.

Changelog

Fixed: Opening a chat in the agent pane shows its conversation again instead of a blank tab

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the agent pane showing a blank tab when opening a chat, by letting the host accept the maxBytes the page sends with _acpmux/attach and _acpmux/events.

The host's params rule never learned the maxBytes key, so it refused both frames with transport.intent_invalid. Adds maxBytes to both methods' params in AcpmuxPaneMethods+Params.swift and in the shared pane policy (policy.json).

Testing

  • Adds AgentPaneOpenPageRelayTests, which sends the page's exact attach and older-page frames through AgentPaneTransport to an acpmux stand-in; it fails before the fix, passes after, and fails rather than hangs via a time limit.
  • Pins maxBytes (and visible) in the policy's every-known-param test cases (params.json).