claude-code - 💡(How to fix) Fix [BUG] claude -p silently exits with no output on Windows 11 (v2.1.131) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58643Fetched 2026-05-14 03:42:58
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

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).

Error Message

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.

Root Cause

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).

Code Example

claude -p "hello"

---

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.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] claude -p silently exits with no output on Windows 11 (v2.1.131) [2 comments, 2 participants]