[BUG] TypeScript LSP plugin non-functional on v2.1.63 — race condition + missing .lsp.json in official plugin

Resolved 💬 6 comments Opened Mar 1, 2026 by prashanth-halappa Closed Apr 13, 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?

Summary

The typescript-lsp@claude-plugins-official plugin is non-functional on Claude Code v2.1.63 (native Mach-O binary on macOS arm64). Two separate issues combine to make LSP completely broken:

  1. The official plugin ships without .lsp.json — the cached plugin directory only contains README.md. The lspServers config exists in marketplace.json but is never extracted to the plugin directory during installation.
  2. Race condition in LspServerManager initialization — even after manually creating the .lsp.json file, the LSP tool never appears because LspServerManager.initialize() runs before plugins finish loading, registering 0 servers.

Environment

  • Claude Code version: 2.1.63 (Mach-O 64-bit executable arm64)
  • OS: macOS Darwin 25.2.0 (arm64)
  • typescript-language-server: v5.1.3 (installed via bun, in PATH)
  • Settings: "ENABLE_LSP_TOOL": "1" in ~/.claude/settings.json
  • Plugin status: typescript-lsp@claude-plugins-official shows as enabled in /plugin

Steps to Reproduce

  1. Install typescript-language-server globally: npm install -g typescript-language-server typescript
  2. Enable the plugin: shows as typescript-lsp Plugin · claude-plugins-official · ✓ enabled in /plugin
  3. Ensure "ENABLE_LSP_TOOL": "1" is set in settings
  4. Restart Claude Code
  5. Ask Claude to use the LSP tool (e.g., "Where is authenticate defined? Use typescript-lsp")

Expected Behavior

The LSP tool should be available with operations like goToDefinition, findReferences, hover, etc., as documented.

Actual Behavior

Claude responds: "I don't have a TypeScript LSP tool available in my current toolset."

Debug log (~/.claude/debug/latest) shows only:

[DEBUG] Using provided version for typescript-lsp@claude-plugins-official: 1.0.0

No LSP server initialization, no tool registration, no error messages.

Investigation Details

Issue 1: Missing .lsp.json in plugin directory

The cached plugin at ~/.claude/plugins/cache/claude-plugins-official/typescript-lsp/1.0.0/ only contains README.md. The lspServers config exists in marketplace.json:

{
  "lspServers": {
    "typescript": {
      "command": "typescript-language-server",
      "args": ["--stdio"],
      "extensionToLanguage": {
        ".ts": "typescript",
        ".tsx": "typescriptreact",
        ".js": "javascript",
        ".jsx": "javascriptreact"
      }
    }
  }
}

But it's never written to .lsp.json during plugin installation/caching.

Issue 2: Race condition persists after manual fix

After manually creating both .lsp.json and plugin.json at the plugin cache root, the LSP tool still doesn't register. The LspServerManager initializes before plugins load — this was reported in #14803, #15235, #16214, and #16291.

Issue 3: Community patch (tweakcc) cannot fix native binaries

npx tweakcc --apply reports success but sets ccInstallationPath: null because v2.1.63 is a compiled Mach-O binary, not a patchable JavaScript bundle. The patch only adds prompt description files, not actual code fixes.

Related Issues

  • #14803 — LSP plugins not recognized (race condition root cause)
  • #15235 — typescript-lsp plugin missing plugin.json/.lsp.json
  • #16214 — "No LSP server available" despite correct config (closed NOT_PLANNED)
  • #16291 — TypeScript LSP Plugin Not Registering with LSP Tool System

What Should Happen?

When the typescript-lsp plugin is enabled and typescript-language-server is installed and in PATH, the LSP tool should be registered and available to Claude with operations like goToDefinition, findReferences, hover, documentSymbol, and workspaceSymbol for .ts, .tsx, .js, and .jsx files.

Specifically:

  1. The plugin installation/caching process should extract lspServers from marketplace.json into a .lsp.json file in the plugin directory
  2. The LspServerManager should initialize after plugins have loaded, so it can discover and register LSP server configurations
  3. The debug log should show the LSP server starting and registering for the configured file types

Error Messages/Logs

Debug log (~/.claude/debug/latest) — entire LSP-related output:

2026-03-01T15:40:47.248Z [DEBUG] Using provided version for typescript-lsp@claude-plugins-official: 1.0.0

No LSP server initialization, no tool registration, no error messages. Total of 9 lines in the debug log — none mention LSP Manager, server startup, or tool registration.

Claude's response when asked to use LSP:
"I don't have a TypeScript LSP tool available in my current toolset."

Plugin cache contents (after manual fix attempt):
~/.claude/plugins/cache/claude-plugins-official/typescript-lsp/1.0.0/
├── .lsp.json    (manually created)
├── plugin.json  (manually created)
└── README.md    (original, only file shipped)

tweakcc --apply output:
✓ Fix LSP support — Enable/fix nascent LSP support
ccInstallationPath: null  (cannot patch Mach-O binary)

Steps to Reproduce

  1. Install typescript-language-server globally:

``
npm install -g typescript-language-server typescript
`
Verify:
which typescript-language-server` returns a valid path

  1. Ensure ENABLE_LSP_TOOL is set in ~/.claude/settings.json:

``json
{ "ENABLE_LSP_TOOL": "1" }
``

  1. Install and enable the typescript-lsp plugin:
  • Via /plugin → Discover → search "typescript-lsp" → Install
  • Or: claude plugin install typescript-lsp@claude-plugins-official
  • Confirm it shows as enabled in /plugin → Installed
  1. Restart Claude Code
  1. Verify the plugin cache is missing .lsp.json:

``
ls ~/.claude/plugins/cache/claude-plugins-official/typescript-lsp/1.0.0/
# Only shows: README.md
``

  1. Manually create .lsp.json in the cache directory with the config from marketplace.json:

``json
{
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"extensionToLanguage": {
".ts": "typescript",
".tsx": "typescriptreact",
".js": "javascript",
".jsx": "javascriptreact"
}
}
}
``

  1. Also create plugin.json at the plugin cache root (not in .claude-plugin/ subdirectory):

``json
{
"name": "typescript-lsp",
"version": "1.0.0",
"description": "TypeScript/JavaScript language server"
}
``

  1. Restart Claude Code again
  1. Ask: "Where is authenticate defined? Use the LSP tool"
  1. Claude responds: "I don't have a TypeScript LSP tool available"
  1. Check ~/.claude/debug/latest — no LSP server initialization logged

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.67 (reported in #14803 as last working version before LSP race condition regression)

Claude Code Version

2.1.63 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Key observations

  1. v2.1.63 is a compiled Mach-O arm64 binary — not a Node.js/JavaScript bundle. This means community patches like tweakcc that modify JS source files cannot fix the initialization order.
  1. The race condition has been reported across 4+ issues (#14803, #15235, #16214, #16291) since v2.0.69. Some were closed as fixed or NOT_PLANNED, but the bug persists in v2.1.63.
  1. All LSP plugins in the official marketplace are affected — not just typescript-lsp. The lspServers config in marketplace.json is never extracted to .lsp.json during installation.
  1. The debug log provides zero diagnostic information — only 1 line mentioning the plugin version. No indication of why LSP servers weren't initialized, making this very hard for users to troubleshoot.

Suggested fix

The LspServerManager initialization should be deferred until after all plugins have loaded and registered their LSP configurations. Alternatively, provide a user-facing lspServers config in ~/.claude/settings.json that bypasses the plugin system entirely.

View original on GitHub ↗

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