npm/pnpm commands execute but produce no output on Windows
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?
When using the Bash tool to run npm or pnpm commands on Windows, the commands execute successfully (exit code 0) but produce no output. This appears to be a recent regression that started a few days ago.
Environment:
OS: Windows
Claude Code Extension Version: Tested on 2.1.9 (latest) and downgraded to 2.1.0 - issue persists on both versions
Working directory: Valid git repository
Node version: v22.15.0
pnpm: Installed and working when run directly in PowerShell
What works:
Basic shell commands (echo, dir, where) - output captured correctly
Direct executables (node --version) - output captured correctly
What doesn't work (no output captured):
pnpm lint - runs successfully but returns "Tool ran without output or errors"
pnpm --version - no output
pnpm dev - executes (exit code 0) but output file is empty
npm --version - no output
npm commands in general - no output
claude --version - no output
Debug logs show:
2026-01-16T20:09:18.996Z [DEBUG] Session environment not yet supported on Windows
Impact:
This makes it impossible for Claude Code to:
Run linters and see results
Run tests and see output
Install dependencies and see progress
Run build commands and see errors
Use any npm/pnpm script effectively
What Should Happen?
When I run npm/pnpm commands through the Bash tool, Claude Code should capture and return stdout/stderr output. Commands like pnpm lint, pnpm --version, npm --version, etc. should display their output just like when I run them directly in PowerShell.
Error Messages/Logs
2026-01-16T20:09:18.996Z [DEBUG] Session environment not yet supported on Windows
2026-01-16T20:09:18.544Z [DEBUG] Getting matching hook commands for PreToolUse with query: Bash
2026-01-16T20:09:18.544Z [DEBUG] Found 2 hook matchers in settings
2026-01-16T20:09:18.544Z [DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
Steps to Reproduce
Open Claude Code in VSCode on Windows
Ask Claude to run any pnpm or npm command using the Bash tool:
Example: Ask "Run pnpm lint" or "Run npm --version"
Observe that the command executes but returns "Tool ran without output or errors"
For comparison, ask Claude to run basic commands that DO work:
Ask "Run echo Hello World" → Returns "Hello World" ✓
Ask "Run node --version" → Returns version number ✓
Ask "Run dir" → Returns directory listing ✓
Verify that running pnpm lint or npm --version directly in my PowerShell works correctly and produces output
Expected: npm/pnpm commands should capture and display their output
Actual: npm/pnpm commands execute successfully but produce no output (even though other commands work fine)
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.9
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗