claude-code - 💡(How to fix) Fix VS Code and Claude Code Refuse to send any Requests on Large Projects

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…

The Claude Code native binary silently exits (exit code 0, no error, no output) when a workspace's .claude/settings.local.json accumulates too many entries in permissions.allow + permissions.additionalDirectories combined. The binary completes initialization (TLS, certs, policy limits) but never reaches the STARTUP phase or makes an API call.

This manifests as "Query closed before response received" in VS Code and the Claude desktop app Code tab, while Chat tab and CLI from other directories work fine.

Error Message

The Claude Code native binary silently exits (exit code 0, no error, no output) when a workspace's .claude/settings.local.json accumulates too many entries in permissions.allow + permissions.additionalDirectories combined. The binary completes initialization (TLS, certs, policy limits) but never reaches the STARTUP phase or makes an API call. 2. Log an error/warning if a limit is exceeded, instead of silently exiting with code 0

  • #51732 / #49522 — same error message, different trigger

Error Messages/Logs

  1. receive error sending before response received.
  2. receive error: "Query closed before response received."

Root Cause

Root Cause (Verified)

Fix Action

Workaround

Trim additionalDirectories in .claude/settings.local.json to reduce combined entry count. In my case, reducing from 12 to 3 directories fixed it.

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?

Description

The Claude Code native binary silently exits (exit code 0, no error, no output) when a workspace's .claude/settings.local.json accumulates too many entries in permissions.allow + permissions.additionalDirectories combined. The binary completes initialization (TLS, certs, policy limits) but never reaches the STARTUP phase or makes an API call.

This manifests as "Query closed before response received" in VS Code and the Claude desktop app Code tab, while Chat tab and CLI from other directories work fine.

Reproduction Steps

  1. Create .claude/settings.local.json in a workspace with ~48 allow rules + ~6+ additionalDirectories
  2. Run: claude -p "hello" < /dev/null from that workspace
  3. Binary exits with code 0, no stdout, no stderr
  4. Run from /tmp with same CLAUDE_CONFIG_DIR — works fine

Root Cause (Verified)

Bisected via --debug-file:

  • Working (from /tmp): Debug log shows full [STARTUP] sequence (MCP configs, setup, skills, LSP, API call) — 245+ log lines
  • Failing (from workspace): Debug log stops after Policy limits: Applied new restrictions successfully — only 25 log lines, never reaches [STARTUP]

Reducing additionalDirectories from 12 to 3 entries (keeping all 48 allow rules) fixes the issue. The threshold appears to be related to total combined size/count of settings entries across user + local settings files.

Environment

  • OS: Windows 11 Enterprise 10.0.26100
  • Claude Code: 2.1.132 and 2.1.133 (both affected)
  • Context: VS Code extension, desktop app Code tab, and standalone CLI -p mode all affected when run from the workspace directory

Expected Behavior

The binary should either:

  1. Process the settings normally regardless of count, OR
  2. Log an error/warning if a limit is exceeded, instead of silently exiting with code 0

Workaround

Trim additionalDirectories in .claude/settings.local.json to reduce combined entry count. In my case, reducing from 12 to 3 directories fixed it.

Related Issues

  • #50616 — similar symptoms (silent exit after "No git remote URL found") but different root cause
  • #51732 / #49522 — same error message, different trigger

What Should Happen?

I shouldn't received "Query closed before receiving response" or similar messages in Claude Code app Code tab or Visual Studio Code.

Error Messages/Logs

Steps to Reproduce

  1. Load Visual Studio Code
  2. click File => Open Folder and open a folder that has many connected folders and directories, local or remote in context history
  3. type a question or comment
  4. receive error sending before response received.

alternative path

  1. sign out of your claude code account from within VS Code
  2. try to reauthenticate
  3. receive error: "Query closed before response received."

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.133

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

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