Fix Claude remote-control wrapper passthrough in cmux
Closed
AU
1mo ago+200+200+012345678901234567890123456789-6-6-0123456789
Summary
- add regression coverage for Claude wrapper passthrough when invoking
claude rc/claude remote-control - stop cmux from injecting
--session-id/--settingsinto passthrough Claude subcommands after leading global options - clear nested
CLAUDECODEmarkers before passthrough execs so cmux-launched sessions stay isolated
Verification
- built and launched
./scripts/reload.sh --tag issue-1782-claude-rc - verified the tagged app bundle includes the updated
Resources/bin/claudewrapper - verified the tagged bundle's wrapper reaches Claude's own remote-control path instead of failing with
Unknown argument: <uuid>
Fixes #1782
Summary by cubic
Hardens the claude wrapper in cmux to correctly passthrough rc/remote-control and other management commands without injecting session/settings flags. Improves option parsing so values aren’t mistaken for subcommands and clears CLAUDECODE to isolate sessions. Fixes #1782.
- Bug Fixes
- Treat
rc/remote-controland other management commands as passthrough, even after global options (including inline forms). - For passthrough, do not inject
--session-idor--settings; always unsetCLAUDECODE. Honor--resume/-rand--from-prby skipping--session-id. - Add regression tests for passthrough after options and for edge cases where option values resemble subcommands.
- Treat
Summary by CodeRabbit
-
Bug Fixes
- The CLI wrapper now more reliably detects management/configuration/update commands and skips injecting internal session/settings parameters (includes broader command set and resume-like flag handling).
-
Tests
- Added regression tests covering passthrough behavior for management commands (including cases with global options and resume-like flags) to ensure correct injection or skipping.