[BUG] claude -p silently exits with no output on Windows 11 (v2.1.131)

Resolved 💬 3 comments Opened May 13, 2026 by mvcgenetsis Closed Jun 12, 2026

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?

Bug Report: claude -p silently exits with no output on Windows

Environment

  • OS: Windows 11
  • Node.js: v20.20.2 (also tested with v24.15.0, same result)
  • Claude Code version: 2.1.131
  • Shell: PowerShell (Windows Terminal)
  • Account type: Team (claude.ai OAuth)

Description

claude -p "hello" exits silently after 10-20 seconds with no output — no stdout, no stderr, no error message. The interactive mode (claude) also starts but renders nothing and does not accept input.

This was working normally yesterday. No changes were made to the system between yesterday (working) and today (broken).

Steps to Reproduce

claude -p "hello"

Expected: a response from the model
Actual: empty output, process exits after ~10-20 seconds

What works

  • claude --version2.1.131 (Claude Code)
  • claude auth status → returns correct JSON with logged-in account
  • claude auth login → browser opens, login succeeds
  • node -e "fetch('https://api.anthropic.com/v1/models', ...)" → returns HTTP 401 (expected, reachable)

What does not work

  • claude -p "hello" → silent exit
  • claude -p "hello" --verbose → still no output at all
  • claude -p "hello" --output-format json → silent exit
  • claude (interactive mode) → blank screen, no input accepted
  • Running claude.exe directly → same silent exit
  • Redirecting stdout and stderr to files → both files are empty

Additional context

  • No proxy configured (netsh winhttp show proxy → direct access)
  • Windows Defender history is clean, no blocked processes
  • The process does start (visible in Get-Process) but dies within seconds
  • Reinstalling Claude Code from scratch does not help
  • Deleting ~/.claude and re-authenticating does not help
  • Tested with both Node 20 LTS and Node 24 — same result
  • CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 has no effect
  • Other colleagues on the same Team account are not affected

What Should Happen?

claude -p "hello" should return a response from the model to stdout and exit with code 0, as it did the day before without any changes to the system.

Error Messages/Logs

No error messages or logs are produced. stdout and stderr are both completely empty.

Redirecting output to files confirms this:
  claude -p "hello" > out.txt 2> err.txt
  Both files are empty after the process exits.

The VS Code extension log shows:
  [error] Error spawning Claude (on channel ...): Error: Query closed before response received
  [error] Failed to load config cache: Error: Query closed before response received
  [error] Error processing client request: Error: Query closed before response received

claude auth status works correctly and returns valid JSON.
claude --version returns 2.1.131 (Claude Code).
--verbose flag produces no additional output.

Steps to Reproduce

  1. Install Claude Code: npm install -g @anthropic-ai/claude-code
  2. Authenticate: claude auth login (succeeds, OAuth via claude.ai)
  3. Run: claude -p "hello"
  4. Wait 10-20 seconds
  5. Process exits with no output

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.140 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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