[BUG] CLI treats tmux/worktree operands after -- as options
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- cli
Research direction
Start where the CLI parses argv and runs startup option validation — look for the check that rejects --desktop combined with --worktree/--tmux, then see whether the scan stops at the first bare --. Reproduce with claude --bare --safe-mode --restricted --strict-mcp-config --help --desktop -- --tmux --worktree against the --help-only control, and confirm the quoted single-argument control still passes. Done means both failing invocations print root help and exit 0 while the conflict error still fires for unseparated flags.
Written by the indexing model from the issue text.
Description
What's Wrong?
In the official Windows Claude Code 2.1.329 executable, separate --tmux and --worktree operands after the -- end-of-options marker trigger the Desktop/worktree conflict check. The invocation exits with code 1 without printing help, even though these operands should no longer be parsed as options.
The alternative operands --tmux=classic and -w produce the same failure. These are two spellings of one argument-boundary defect, not separate issues.
What Should Happen?
Startup option checks should stop at the first --. Operands after it must not activate tmux/worktree routing. In the tested help invocations, Claude Code should print root help and exit 0, as the matched controls do.
Steps to Reproduce
Exact argument sequences tested on 2026-11-20:
claude --bare --safe-mode --restricted --strict-mcp-config --help --desktop -- --tmux --worktree
claude --bare --safe-mode --restricted --strict-mcp-config --help --desktop -- --tmux=classic -w
Both return exit 1, empty stdout, and this stderr:
--desktop only opens the Claude Desktop app; it can't be combined with `--worktree` or `--tmux`.
The executable was invoked using Node's spawnSync with an argument array and shell: false. The first failing suffix was:
["--help", "--desktop", "--", "--tmux", "--worktree"]
The four isolation flags shown above preceded it in every case. Each invocation used fresh disposable working, home, configuration, cache, and temporary directories; real user credentials/settings were not passed. API/proxy URLs pointed to loopback port 1, and updater/nonessential traffic settings were disabled. This isolates configuration, but is not an OS filesystem/network sandbox. The shortened command without the isolation flags has not been independently reproduced.
Matched Controls and Results
Every row had the same prefix:
claude --bare --safe-mode --restricted --strict-mcp-config
| Remaining arguments | Exit | Help on stdout | Conflict on stderr |
|---|---|---|---|
--help |
0 | Yes | No |
--help --desktop -- literal-a literal-b |
0 | Yes | No |
--help --desktop -- --tmux --worktree |
1 | No | Yes |
--help --desktop -- --tmux=classic -w |
1 | No | Yes |
--help --desktop -- "--tmux --worktree" |
0 | Yes | No |
In the final control, the quoted text is one argument; it is not an equivalent invocation or a general workaround. It helps distinguish exact-token scanning from searching text within an operand.
All five invocations completed in approximately 1.7–2.2 seconds, with no process-launch errors or timeouts: three passing controls and two contract mismatches. Independent review of the recorded argv arrays, exits, and raw streams confirmed this narrow distinction.
Environment
- Claude Code: 2.1.329.
- OS: Windows 11, x86-64, native executable.
- Launcher: Node.js 26.13.0, direct executable invocation, no shell tokenization.
- Executable SHA-256:
527162bb4578e3dc36319fa913a530d5dc1f752115a6a4fd139981702bf282d0. - Windows Authenticode reported a valid signature from Anthropic, PBC before the study; the probe checked the recorded file hash.
- Model/API: not exercised; these were help invocations, not conversation requests.
- Regression/last working version: unknown. Other builds and operating systems were not tested.
Scope and Related Reports
Observed impact is incorrect help handling and a spurious option-conflict error. Desktop launch, tmux operation, worktree creation, normal prompt handling, and security impact were not demonstrated.
Related historical report: #3844 concerns the old SDK omitting the -- separator. Here the separator is explicitly present and a startup option check still treats later operands as flags. A limited search did not identify an exact duplicate of this case.
No leaked source, credentials, private prompts, or home/project paths are included. The installed executable was not modified.
- Dominant language
- TypeScript
- Stars
- 156k
- Forks
- 25k
- Avg merge
- 16h 19m
- Merged PRs (30d)
- 5
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anthropics/claude-code
-
area:vscode bug has repro platform:vscode platform:windows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
anthropics/claude-code#111416 ·
-
area:plugins area:tui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
anthropics/claude-code#111195 ·
-
area:docs area:security documentation enhancement platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anthropics/claude-code#111180 ·
-
area:ide enhancement platform:macos platform:vscode
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anthropics/claude-code#111172 ·
-
area:mcp bug has repro platform:linux platform:wsl
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
anthropics/claude-code#111077 ·
All issues in anthropics/claude-code
Similar issues
-
fix(resources): `flisk resources api` fails with a bare "too many arguments" and no hint; status, logs, down and networks already explain names are not positionalPossibly taken A pull request linked to this issue is open or already merged. Openarea: cli beginner beginner friendly bug community difficulty: easy dx easy first-timers-only good first issue hacktoberfest help wanted low-hanging fruit mentor available priority: P3 severity: low tech: typescript testing up-for-grabs ux
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
backlog-skill cat:docs documentation effort:s ready-for-agent sev:low
Difficulty 1/5 Under an hour Newbie friendliness 82/100
LucasSantana-Dev/Lucky#3284 ·
Maintainers usually reply within 1 day
-
.aif still missing from the pipeline and library MIME maps, AUDIO_INPUTS, and search aliasesPossibly taken A pull request linked to this issue is open or already merged. Openarea: backend bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
snapotter-hq/SnapOtter#5194 ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
homarr-labs/homarr#7671 ·
Maintainers usually reply within 1 day
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openclaw/openclaw#203385 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day