[BUG] Claude Code - LSP Tool Returns Empty Results Despite Server Responding Correctly (Windows)

Resolved 💬 14 comments Opened Jan 10, 2026 by ChanghoSong Closed May 10, 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?

Two issues with LSP Tool on Windows:

Issue #1 - ENOENT Error: Claude Code cannot spawn LSP servers because Node.js spawn() without shell: true cannot find .cmd or .ps1 files on Windows. Error: spawn typescript-language-server ENOENT

Issue #2 - Empty Results Bug: After creating .exe shims to fix Issue #1, the LSP tool returns "No symbols found", "No hover information", etc. for ALL document-level operations, even though the LSP server responds correctly with valid data. Only workspaceSymbol works.

This affects ALL tested LSP servers including the official typescript-lsp@claude-plugins-official plugin.

What Should Happen?

  1. LSP servers should spawn correctly on Windows (find .cmd files or use shell: true)
  2. Document-level operations (documentSymbol, hover, findReferences, goToDefinition, etc.) should return the data that the LSP server provides

Direct test results (same file, same LSP server):
| Operation | Direct Test | Claude Code |
|-----------|------------|-------------|
| documentSymbol | ✅ 6 items | ❌ "No symbols found" |
| hover | ✅ "class UserService" | ❌ "No hover info" |
| references | ✅ 7 items | ❌ "No references" |
| workspaceSymbol | ✅ 256 items | ✅ 13 items |

Error Messages/Logs

**Issue #1 - ENOENT (before .exe shim fix):**

[ERROR] LSP server plugin:typescript-lsp:typescript failed to start: spawn typescript-language-server ENOENT
[ERROR] LSP server plugin:vtsls:typescript failed to start: spawn vtsls ENOENT


**Issue #2 - Server responds but Claude Code shows empty results:**

[DEBUG] [LSP PROTOCOL plugin:vtsls:typescript] Sending notification 'textDocument/didOpen'.
[DEBUG] LSP: Sent didOpen for C:\...\test-lsp.ts (languageId: typescript)
[DEBUG] [LSP PROTOCOL plugin:vtsls:typescript] Sending request 'textDocument/hover - (1)'.
[DEBUG] [LSP PROTOCOL plugin:vtsls:typescript] Received response 'textDocument/hover - (1)' in 4ms. ✅
[DEBUG] [LSP PROTOCOL plugin:vtsls:typescript] Sending request 'textDocument/documentSymbol - (2)'.
[DEBUG] [LSP PROTOCOL plugin:vtsls:typescript] Received response 'textDocument/documentSymbol - (2)' in 32ms. ✅
[DEBUG] [LSP PROTOCOL plugin:vtsls:typescript] Sending request 'textDocument/references - (3)'.
[DEBUG] [LSP PROTOCOL plugin:vtsls:typescript] Received response 'textDocument/references - (3)' in 61ms. ✅


**User sees:** "No symbols found", "No hover information available", "No references found"

Steps to Reproduce

Issue #1 (ENOENT):

  1. Fresh Windows 10/11 install
  2. Install Node.js and run: npm install -g typescript-language-server typescript
  3. In Claude Code settings, add: "env": { "ENABLE_LSP_TOOL": "1" }
  4. Enable typescript-lsp@claude-plugins-official plugin
  5. Restart Claude Code
  6. Check debug logs at ~/.claude/debug/*.txt
  7. Observe: spawn typescript-language-server ENOENT

Issue #2 (Empty Results - after fixing Issue #1):

  1. Create .exe shims for LSP servers using PowerShell:
$code = @"
using System;
using System.Diagnostics;
public class Shim {
    public static int Main(string[] args) {
        ProcessStartInfo info = new ProcessStartInfo();
        info.FileName = "cmd.exe";
        info.Arguments = "/c typescript-language-server.cmd " + string.Join(" ", args);
        info.UseShellExecute = false;
        Process p = Process.Start(info);
        p.WaitForExit();
        return p.ExitCode;
    }
}
"@
Add-Type -TypeDefinition $code -OutputAssembly "C:\Users\USERNAME\AppData\Roaming\npm\typescript-language-server.exe" -OutputType ConsoleApplication
  1. Create test file test-lsp.ts:
interface User {
  id: number;
  name: string;
}

class UserService {
  private users: User[] = [];
  addUser(user: User): void {
    this.users.push(user);
  }
}

function greet(user: User): string {
  return `Hello, ${user.name}!`;
}

const service = new UserService();
  1. Restart Claude Code
  2. Use LSP tool: documentSymbol on test-lsp.ts
  3. Observe: "No symbols found in document"
  4. Use LSP tool: workspaceSymbol on test-lsp.ts
  5. Observe: Returns symbols correctly (this one works!)
  6. Check debug logs: Server received response in 32ms but user sees empty results

---

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.3

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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