acpmux: Claude chats list Claude Code's own modes (Auto, Manual, Accept edits, Plan, Bypass permissions), no invented Normal/Full access

Merged
TE
16d ago
+55-17

Leo saw a Claude chat's mode menu list Normal / Auto / Full access: modes Claude Code does not have. Those names come from acpmux, not the webview: claude_stdio::MODES was ("default","Normal"), ("plan","Plan"), ("auto","Auto"), ("bypassPermissions","Full access"), invented in 8bafb2c (#16174, "approve-edits policy replacing Claude's own permission modes"), with "Full access" kept by 8a96bfa (cx-wx93i).

Now acpmux reports Claude Code's own list, in Claude Code's menu order, each with Claude Code's description (ACP availableModes[].description and the mode config option):

idlabeldescription
autoAutoClaude handles permission decisions
defaultManualAlways ask before making changes
acceptEditsAccept editsAutomatically accept all file edits
planPlanCreate a plan before making changes
bypassPermissionsBypass permissionsAccepts all permissions

The ids are unchanged (they are Claude Code's --permission-mode values), so the start mode (still bypassPermissions, start_mode.rs), saved picks, the asking tables (web_modes::ASKING_MODES) and the full-access guard all hold. acceptEdits is offered again because it is one of Claude Code's own modes.

This is the first, smallest piece of the composer-look mode-menu order. The webview menu (header "Mode", Recommended badge, number keys, Codex's own labels and icons, tighter rows, symbol + label button) follows as its own PR.

Changelog

  • Fixed: Claude chats list Claude Code's own permission modes (Auto, Manual, Accept edits, Plan, Bypass permissions) with their descriptions, instead of an invented "Normal" and "Full access".

Regression test

cd cmux-tui && cargo test -p acpmux --lib modes_are_claude_codes_own (on huge-blue)

  • red on base (test commit 1d4cb8a on base 5da6397): left: [("default","Normal",""), ("plan","Plan",""), ("auto","Auto",""), ("bypassPermissions","Full access","")]
  • green on head.

Observed / Not run

  • Observed (huge-blue): cargo test -p acpmux --lib 516 passed; --test start_mode --test web_mode_drift --test full_access_resume --test full_access_setting all passed; --test hub_integration 360/361, the one failure (session_list_order::the_session_list_answers_while_other_clients_keep_changing_sessions, "spawn agent fake") is a timing flake unrelated to modes and passed on rerun.
  • Not run: clippy (CI), the Mac app.

No capture: acpmux (Rust) change only; the webview menu PR carries the gallery compare.

Agent session: cosmic-gray

🤖 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 Claude chat mode menu to list Claude Code's own permission modes instead of the invented names acpmux reported. Claude chats now show Auto, Manual, Accept edits, Plan, and Bypass permissions with their descriptions and in Claude Code's menu order, replacing the made-up "Normal" and "Full access".

  • Mode ids are unchanged, so the start mode, saved picks, permission-policy tables, and the full-access guard keep working.
  • acceptEdits is offered again since it is one of Claude Code's real modes.
  • The webview menu UI changes (header, badges, keybindings) land in a separate PR.