[BUG] In VSCode, claudeProcessWrapper doesn't work with .cmd wrapper

Open 💬 3 comments Opened May 21, 2026 by arisudesu

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

With this simple script at D:\claude-process-wrapper.cmd, it fails with error in logs.

Wrapper is configured as:

  "claudeCode.claudeProcessWrapper": "D:\\claude-process-wrapper.cmd",

Even the file D:\set.txt is not created which means that the wrapper isn't run. When I run it in terminal, or double-click, the wrapper works correctly tho.

What Should Happen?

Field can not be empty

Error Messages/Logs

2026-05-21 12:09:22.332 [info] Launching Claude on channel: ebei3s1z1wd
2026-05-21 12:09:22.333 [info] Spawning Claude with SDK query function - cwd: d:\PROJECTS\xxxxx, permission mode: default, version: 2.1.145, D:\claude-process-wrapper.cmd, resume: f478d1a0-a157-41c8-b401-ee358153b1b2
2026-05-21 12:09:22.333 [info] Closing Claude on channel: ebei3s1z1wd
2026-05-21 12:09:22.334 [error] Error spawning Claude (on channel ebei3s1z1wd): Error: spawn EINVAL
2026-05-21 12:09:22.334 [error] Failed to load config cache: Error: spawn EINVAL
2026-05-21 12:09:22.334 [error] Error processing client request: Error: spawn EINVAL

Steps to Reproduce

@echo off
set > D:\set.txt
shift
"claude.exe" %*

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.145 (VSCode ext version); 2.1.142 (Claude Code) (local installed binary)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗