[BUG] Windows: LSP query operations return empty results while diagnostics work (request/response broken, notifications OK)

Resolved 💬 3 comments Opened Mar 11, 2026 by cyphx13 Closed Apr 9, 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 Description

On Windows, LSP plugins start successfully and produce diagnostics (server-initiated notifications), but all query operations (documentSymbol, hover, findReferences, goToDefinition,
goToImplementation, workspaceSymbol, incomingCalls, outgoingCalls) return empty results.

This is a separate issue from the known ENOENT spawn failures (#17136, #19658, #21115, #32264, #16751). The spawn issue was resolved by patching marketplace.json to use node with absolute paths to
the JS entry points. The servers start and run — but request/response communication is broken.

## Environment

  • Claude Code: 2.1.72
  • OS: Windows 11 Pro (10.0.26200)
  • Node.js: v22.22.0
  • Intelephense: 1.16.5
  • typescript-language-server: 5.1.3
  • Plugins enabled: php-lsp, typescript-lsp, pyright-lsp (all @claude-plugins-official)
  • ENABLE_LSP_TOOL: 1

What Should Happen?

Expected Behavior

LSP query operations should return symbol information, hover docs, references, etc. — the same behavior as on macOS/Linux.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

### 1. Fix the spawn issue (prerequisite)

The official plugins fail with ENOENT: no such file or directory, uv_spawn 'intelephense' because Windows npm global installs create .cmd wrappers, not .exe files, and spawn() without shell:
true
can't execute them.

Workaround applied: Patched ~/.claude/plugins/marketplaces/claude-plugins-official/.claude-plugin/marketplace.json to use node directly:

```json
"intelephense": {
"command": "node",
"args": ["C:/Users/<user>/AppData/Roaming/npm/node_modules/intelephense/lib/intelephense.js", "--stdio"],
"extensionToLanguage": { ".php": "php" }
}

Same pattern for typescript-language-server (lib/cli.mjs).

  1. Observe diagnostics work

After restart, LSP diagnostics appear correctly:
c:\project\Permissions.php:
× [Line 23:26] Undefined type 'JF\Permissions\Acl\Acl'. [P1009] (intelephense)

c:\project\router.ts:
× [Line 1:17] Cannot find module 'vue' or its corresponding type declarations. [2307] (typescript)

  1. Observe query operations fail

All of these return empty, even on trivial 10-line test files with zero dependencies, after 60+ seconds of indexing time:

LSP documentSymbol → "No symbols found in document"
LSP hover → "No hover information available"
LSP findReferences → "No references found"
LSP goToDefinition → "No definition found"
LSP workspaceSymbol → "No symbols found in workspace"

Analysis

In the LSP protocol:

  • Diagnostics are server-initiated notifications (textDocument/publishDiagnostics) — the server pushes them without a request
  • Query operations are request/response pairs — the client sends a JSON-RPC request and waits for a response

The fact that only notifications work but request/response is broken suggests a stdio communication issue specific to Windows. Possible causes:

  • stdout buffering differences on Windows (node.exe may buffer responses differently)
  • JSON-RPC response parsing issue with Windows line endings (\r\n vs \n)
  • The response reader may not be correctly processing data from the spawned node.exe process

Workarounds Attempted

┌──────────────────────────────────────────────┬────────┬─────────────┬─────────┐
│ Approach │ Spawn │ Diagnostics │ Queries │
├──────────────────────────────────────────────┼────────┼─────────────┼─────────┤
│ Default (intelephense direct) │ ENOENT │ N/A │ N/A │
├──────────────────────────────────────────────┼────────┼─────────────┼─────────┤
│ cmd.exe /c intelephense --stdio │ OK │ OK │ Empty │
├──────────────────────────────────────────────┼────────┼─────────────┼─────────┤
│ node <absolute-path>/intelephense.js --stdio │ OK │ OK │ Empty │
└──────────────────────────────────────────────┴────────┴─────────────┴─────────┘

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.72

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Warp

Additional Information

Additional Context

  • Also attempted cmd.exe /c wrapper approach — same result (diagnostics work, queries don't)
  • Tested with both PHP (Intelephense) and TypeScript (typescript-language-server) — both show the same pattern
  • Tested on both complex project files AND trivial 10-line standalone files — same result
  • This rules out workspace root configuration or indexing depth as the cause

View original on GitHub ↗

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