VS Code and Claude Code Refuse to send any Requests on Large Projects

Resolved 💬 4 comments Opened May 8, 2026 by francislouispearson-arch Closed May 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?

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_

View original on GitHub ↗

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