LSP tool hangs when calling typescript-language-server despite successful initialization
Description
The LSP tool hangs indefinitely when invoked against .tsx/.ts files, even though the typescript-language-server initializes correctly and responds with full capabilities.
Environment
- Claude Code version: latest (as of 2026-04-01)
- OS: macOS (Darwin 25.3.0)
- Node: v22.16.0
- typescript-language-server: 5.1.3
- TypeScript (workspace): 5.9.3
Configuration
Plugin
Using typescript-lsp@claude-plugins-official (enabled via /plugin, reloaded via /reload-plugins).
Reload output confirms LSP is registered:
Reloaded: 5 plugins · 1 skill · 6 agents · 0 hooks · 0 plugin MCP servers · 2 plugin LSP servers
Also tried .lsp.json (same result)
Placed at both ~/.claude/.lsp.json and <project>/.claude/.lsp.json:
{
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"extensionToLanguage": {
".ts": "typescript",
".tsx": "typescriptreact",
".js": "javascript",
".jsx": "javascriptreact"
},
"workspaceFolder": "/path/to/project/frontend"
}
}
Note: Before the plugin was enabled, .lsp.json in both locations returned No LSP server available for file type: .tsx rather than hanging, suggesting the .lsp.json discovery mechanism may also be broken (separate issue).
Steps to Reproduce
- Install
typescript-language-serverglobally (npm install -g typescript-language-server) - Enable
typescript-lsp@claude-plugins-officialvia/plugin - Run
/reload-plugins(confirms2 plugin LSP servers) - Use the LSP tool on any
.tsxfile:
````
LSP operation=documentSymbol filePath=frontend/src/app/page.tsx line=1 character=1
- Tool hangs indefinitely, returns
[Tool result missing due to internal error]
Evidence: Server Works Correctly
Tested the same server manually via Python, sending an LSP initialize request:
proc = subprocess.Popen(
['typescript-language-server', '--stdio'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
cwd='/path/to/project/frontend'
)
msg = json.dumps({
'jsonrpc': '2.0', 'id': 1, 'method': 'initialize',
'params': {'processId': None, 'rootUri': 'file:///path/to/project/frontend', 'capabilities': {}}
})
content = f'Content-Length: {len(msg)}\r\n\r\n{msg}'
proc.stdin.write(content.encode())
proc.stdin.flush()
Result: Server responds immediately with full capabilities (documentSymbol, hover, references, etc.). No hang, no errors.
Expected Behavior
LSP tool should return document symbols (or other requested data) from the running typescript-language-server.
Actual Behavior
LSP tool hangs until timeout, then returns [Tool result missing due to internal error].
Additional Notes
- The
.lsp.jsonfile placed in the project root (<project>/.lsp.json) was not discovered at all (returned "No LSP server available"). Only the plugin registration was detected, but it still hangs. .lsp.jsonplaced at~/.claude/.lsp.jsonand<project>/.claude/.lsp.jsonalso returned "No LSP server available", suggesting.lsp.jsonfile discovery only works via plugins.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗