claude-code - 💡(How to fix) Fix VS Code extension 2.1.116 'Query closed before response received' on Windows 11 (terminal claude works fine) [1 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#51732Fetched 2026-04-22 07:54:20
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

Error: Query closed before response received at /Users/beastvs/.vscode/extensions/anthropic.claude-code-2.1.116/out/src/extension.js:1:500000 (line breaks simplified)

Extension Output (full log): [2026-04-22 12:34:15] Starting Claude extension initialization [2026-04-22 12:34:16] Extension load timeout on initial query [2026-04-22 12:34:17] Query timeout: no response from subprocess [2026-04-22 12:34:18] Error in IPC: connection closed unexpectedly [2026-04-22 12:34:19] Subprocess exit code: 1

This occurs immediately on first query attempt. No partial responses, just immediate closure.

Code Example

Error: Query closed before response received
  at /Users/beastvs/.vscode/extensions/anthropic.claude-code-2.1.116/out/src/extension.js:1:500000 (line breaks simplified)

Extension Output (full log):
[2026-04-22 12:34:15] Starting Claude extension initialization
[2026-04-22 12:34:16] Extension load timeout on initial query
[2026-04-22 12:34:17] Query timeout: no response from subprocess
[2026-04-22 12:34:18] Error in IPC: connection closed unexpectedly
[2026-04-22 12:34:19] Subprocess exit code: 1

This occurs immediately on first query attempt. No partial responses, just immediate closure.
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?

VS Code extension 2.1.116 fails to communicate with Claude. Every query results in "Query closed before response received" error. Extension hangs on initial response, then times out.

Notably: terminal claude (CLI) works perfectly on the same machine. The failure is isolated to the VS Code extension subprocess communication protocol.

What Should Happen?

The VS Code extension should communicate with Claude and return a response within reasonable time, just as it does on other machines and as the terminal claude CLI does.

Error Messages/Logs

Error: Query closed before response received
  at /Users/beastvs/.vscode/extensions/anthropic.claude-code-2.1.116/out/src/extension.js:1:500000 (line breaks simplified)

Extension Output (full log):
[2026-04-22 12:34:15] Starting Claude extension initialization
[2026-04-22 12:34:16] Extension load timeout on initial query
[2026-04-22 12:34:17] Query timeout: no response from subprocess
[2026-04-22 12:34:18] Error in IPC: connection closed unexpectedly
[2026-04-22 12:34:19] Subprocess exit code: 1

This occurs immediately on first query attempt. No partial responses, just immediate closure.

Steps to Reproduce

  1. Open any folder in VS Code
  2. Open the Claude Code sidebar
  3. Enter any query in the input field
  4. Press Enter or click Send
  5. Extension immediately fails with "Query closed before response received"

The failure is consistent and reproducible on every attempt. No variation based on query content or file context.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.116

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Xterm

Additional Information

Diagnostic Summary

This bug is isolated to the VS Code extension + Beast's Windows environment. The failure indicates a machine-level issue with subprocess communication, not a code-level bug:

Reproduced identically on:

  • VS Code 1.98 (stable)
  • VS Code 1.99.0 (fresh Insiders install)
  • Both with fresh/independent extension installations
  • Workspace-independent (fails in all workspaces)

Working on same machine:

  • Terminal claude CLI (2.1.116) works perfectly
  • PowerShell/CMD communication is functional

Conclusion: The subprocess IPC protocol fails specifically when invoked by the VS Code extension on this machine, but works via CLI on the same machine. This suggests: pty/stdio misconfiguration, process isolation policy, antivirus interference with subprocess spawning, or environment variable path issues specific to VS Code's execution context.

System Info:

  • Windows 11 Home 10.0.26200
  • Claude Code 2.1.116

Anthropic team should investigate platform-specific subprocess handling on Windows 11 with this specific configuration.

extent analysis

TL;DR

The VS Code extension's subprocess communication protocol likely needs adjustment to work correctly on Windows 11, specifically addressing potential issues with pty/stdio configuration, process isolation policy, antivirus interference, or environment variable path settings.

Guidance

  • Investigate the subprocess spawning mechanism used by the VS Code extension on Windows 11 to identify any platform-specific issues or misconfigurations.
  • Check for any antivirus software interference that might be blocking or affecting the subprocess communication.
  • Review environment variable settings and paths to ensure they are correctly configured for the VS Code extension's execution context.
  • Consider testing the extension on a different Windows 11 environment or with a different antivirus setup to isolate the issue.

Example

No specific code snippet can be provided without further details on the extension's implementation, but reviewing the extension.js file around line 500000 might offer insights into how the subprocess communication is handled.

Notes

The issue seems isolated to the interaction between the VS Code extension and the Windows 11 environment, specifically with subprocess communication. The fact that the CLI version works suggests the problem is not with the Claude Code itself but with how it's integrated into VS Code on this particular platform.

Recommendation

Apply a workaround by potentially adjusting the subprocess communication protocol or environment settings until a more permanent fix can be implemented by the Anthropic team, as the issue seems to require platform-specific adjustments.

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 VS Code extension 2.1.116 'Query closed before response received' on Windows 11 (terminal claude works fine) [1 comments, 2 participants]