[FEATURE] [VSCode] Support array form for claudeProcessWrapper, OR pass literal "claude" as argv[1] — composition forces compiled shims on Windows
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Windows-specific UX problem. The claudeCode.claudeProcessWrapper setting in the Claude Code VS Code extension cannot compose with any wrapper CLI that has a subcommand args parser.
The claudeCode.claudeProcessWrapper setting accepts a single executable path — no args. The Claude Code VS Code extension launches the wrapper as <wrapper> <bundled-claude-path> <args...>, passing the resolved path to the Claude Code VS Code extension's bundled claude binary as argv[1]. So a wrapper expecting <wrapper> <args...> won't be able to work.
A workaround is for user compiles additional native PE-format .exe shim that configures their args.
Why Windows-specific when the argv[1] shape itself is cross-platform (same shape reported on Linux in #21565):
- Linux / macOS users can drop in a 5-line bash-shebang shim that drops
argv[1]and re-execs the wrapper. Trivial. - Windows users cannot use a
.cmd/.bat— Node.js CVE-2024-27980 ("BatBadBut") blocks.bat/.cmdfromchild_process.spawnwithoutshell: true, which the Claude Code VS Code extension correctly does not set. Result:spawn EINVAL. - Windows users also cannot use shell aliases (the workaround the OP of #10500 used on Linux / macOS) —
cmd.exehas no aliases, PowerShell aliases aren't visible tochild_process.spawn.
Net cost on Windows: every developer who wants to compose Claude Code with their own wrapper CLI has to create their own standalone native .exe shim for args passing.
Proposed Solution
Either of these eliminates the compiled-shim .exe requirement on Windows:
- Array form for
claudeCode.claudeProcessWrapper— preferred:
``json``
"claudeCode.claudeProcessWrapper": ["C:\\path\\wrapper.exe", "claude"]
The Claude Code VS Code extension would spawn(array[0], [...array.slice(1), ...claudeArgs]) and skip injecting the bundled-claude path.
- Pass the literal string
"claude"asargv[1]instead of the resolved bundled-claude path — what naive wrappers expect
Either fix removes the Windows compile step and obsoletes the Linux / macOS shell-script workaround.
Alternative Solutions
Workarounds tried; gaps each leaves on Windows:
- Linux / macOS shell alias (
alias claude=/usr/local/bin/wrapper claude, per #10500) — works forclaudeCode.useTerminal: truemode on Linux / macOS only. Not applicable on Windows (no equivalent shell-alias mechanism visible tochild_process.spawn). - 5-line bash shebang shim — works on macOS/Linux because Node.js CVE-2024-27980 only affects Windows. No
.cmd/.batequivalent on Windows. - Standalone native
.exeshim — currently the only working Windows path. The shim dropsargv[1]and re-invokes the real wrapper withclaudeprepended. Verified working, but a high-friction per-machine setup step that every Windows developer would otherwise duplicate.
Priority
High - Significant impact on productivity
Feature Category
Developer tools/SDK
Use Case Example
Developer wants to launch Claude Code via the Claude Code VS Code extension's claudeCode.claudeProcessWrapper setting, pointed at a strict-CLI wrapper (org SSO/auth, model router, plugin-aware launcher, etc.) that treats argv[1] as a subcommand.
Today on Windows (Claude Code VS Code extension v2.1.132):
- Set
claudeCode.claudeProcessWrappertoC:\path\wrapper.exe→ "Claude Code process exited with code 2" (the wrapper rejects the bundled-claude path as an unknown subcommand). - Try a
.cmdshim that doesshift && wrapper claude %*→spawn EINVAL(Node.js CVE-2024-27980). - Create a standalone native
.exeshim that dropsargv[1]and re-invokeswrapper claude <args>. PointclaudeCode.claudeProcessWrapperat it. Works.
With proposal #1:
"claudeCode.claudeProcessWrapper": ["C:\\path\\wrapper.exe", "claude"]
No shim, no compile.
Related issues: #21565 (closed by inactivity bot — same argv[1] shape on Linux, Claude Code VS Code extension v2.1.22, wrongly tagged as duplicate of #10506 / #14501), #10500 (closed by OP — POSIX shell-alias workaround for terminal mode), #10491 / #8510 / #10506 / #56013 / #56648 / #13022 (adjacent).
Environment: Claude Code VS Code extension v2.1.132 on Windows x64.
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗