Contracts: AcpmuxRequestMeta lists every key acpmux's clients send; --focus=VALUE takes only true or false

Merged
TE
17h ago
+113-4

Leo, 2026-11-05: "You guys keep running into these. These are weird issues that I feel like you should be able to just fix beforehand and check on beforehand."

Fixes forward the two findings from #36820's Codex review (receipt: https://github.com/manaflow-ai/cmux/pull/36820#issuecomment-6670690368 and the review at 58414b0).

AcpmuxRequestMeta was missing keys acpmux's own clients send. The closed type now also lists class and topic (acpmux send --class/--thread), effort and tags (run, orchestrate, the hand, the TUI), worktree and disallowedTools (run), and compression (a peer's initialize offer). The new test protocol_request_meta_lists_every_key_acpmux_clients_send scans acpmux's client code (cli/, hand/, tui/, client.rs, peer.rs, prompt_class.rs) for _meta.acpmux writes. It fails on any key the type doesn't list. The IR and the web types.ts are regenerated.

--focus=VALUE accepts only true or false. Before, cmux open-remote --focus=no quietly meant true. Now any other value is a usage error (new flag_bool string, English and Japanese). open_remote_focus_reaches_the_action covers the refusal.

cli-action-requests.json is regenerated against the current catalog. Base added actions after #36820 landed.

After screenshots don't apply: this changes contract checks, a schema and CLI argument validation only, with no UI.

Checks, on fleet Linux:

  • acpmux protocol tests: 12/12, IR blessed.
  • Webviews: acpmux-protocol:codegen and :check.
  • cmux-tui: action_argument_contract.
  • clippy -D warnings and fmt on cmux-tui and acpmux.
  • check-swift-acpmux-protocol.py on the repo.

Changelog

  • CLI: --focus=VALUE on an action with a focus argument now refuses anything but true or false, instead of treating it as true.

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Implements the two findings from #36820's code review: acpmux's closed request-meta type now accepts every key its own clients send, and --focus=VALUE on an action with a focus argument only takes exactly true or false.

Changes

  • AcpmuxRequestMeta now lists class, topic, effort, tags, worktree, disallowedTools, and compression; a new test scans the CLI, hand, TUI, peer, and initialize sources and fails on any key not listed.
  • --focus=no and any other value is now a usage error (English and Japanese) instead of being silently treated as true.
  • The cli-action-requests.json fixture and the protocol IR and web types.ts are regenerated against the current catalog, including the actions added by the feat-cmux-next merge.