claude-code - 💡(How to fix) Fix LSP tool not registered on Windows even with native LSP-server binary [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#54652Fetched 2026-04-30 06:39:47
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Code Example

{
    "dbt": {
      "command": "dbt",
      "args": ["lsp"],
      "transport": "stdio",
      "extensionToLanguage": {"sql": "dbt-sql", "yml": "dbt-yaml", "yaml": "dbt-yaml"},
      "initializationOptions": {"projectRoot": "${workspaceRoot}"}
    }
  }
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Desktop on Windows, bundled Claude Code 2.1.121 (%APPDATA%\Claude\claude-code\2.1.121\claude.exe)
  • Also reproduces with standalone Claude Code 2.1.122 from npm (%APPDATA%\npm\claude.cmd)
  • ~/.claude/settings.json has "env": {"ENABLE_LSP_TOOL": "1"} — verified ENABLE_LSP_TOOL=1 is present in the running process environment via env | grep
  • Project .lsp.json correctly configured by the dbt-lsp-bundle plugin:
    {
      "dbt": {
        "command": "dbt",
        "args": ["lsp"],
        "transport": "stdio",
        "extensionToLanguage": {"sql": "dbt-sql", "yml": "dbt-yaml", "yaml": "dbt-yaml"},
        "initializationOptions": {"projectRoot": "${workspaceRoot}"}
      }
    }
  • The LSP server binary is a native dbt.exe at C:\Users\<user>\.local\bin\dbt.exe (dbt-fusion 2.0.0-preview.173). where dbt resolves to the .exe directly — not an npm .cmd wrapper.

Expected

An LSP tool registered in the Claude Code session, callable as LSP.goToDefinition, LSP.hover, etc. (per the dbt-lsp-bundle skill documentation).

Actual

No LSP tool registered. Tool listing returns nothing for lsp, language server, goToDefinition, or select:LSP. The tool isn't failing on spawn — it's not present in the tool registry at all.

Verified independently by running claude --print "list every tool you have available that starts with LSP" in a separate terminal: response confirms no LSP-prefixed tools.

Distinct from existing Windows LSP issues

This is not the same as the .cmd-wrapper spawn bugs:

  • #33484 — LSP plugin Windows npm .cmd spawning
  • #17136 — TypeScript LSP Windows wrapper script
  • #15914 — LSP plugin loading

Those track failures spawning npm-installed servers (which are .cmd shims). In this report the underlying LSP server is a native .exe, so any spawn-of-shim path doesn't apply. The failure mode is also different — registration appears to fail silently before any spawn attempt, since no LSP tool is exposed at all.

Diagnostic info gathered

CheckResult
ENABLE_LSP_TOOL=1 in process env✅ Yes
~/.claude/settings.json env block honored✅ Yes
.lsp.json exists at project root✅ Yes
.lsp.json is valid JSON✅ Yes
dbt --version works from PATHdbt-fusion 2.0.0-preview.173
where dbt resolves toC:\Users\<user>\.local\bin\dbt.exe (native, not .cmd)
LSP tool registered❌ Not present

Repro steps

  1. Install dbt-fusion native binary (dbt.exe) on Windows PATH
  2. Create a .lsp.json at the workspace root pointing to dbt lsp
  3. Set env.ENABLE_LSP_TOOL=1 in ~/.claude/settings.json
  4. Launch Claude Desktop (or the npm CLI), open the workspace
  5. Ask Claude to list available tools — no LSP tool present

extent analysis

TL;DR

The LSP tool registration issue may be resolved by verifying the correctness of the .lsp.json configuration and ensuring that the dbt.exe binary is properly installed and accessible.

Guidance

  • Review the .lsp.json file to ensure it is correctly formatted and points to the dbt lsp command.
  • Verify that the dbt.exe binary is installed and accessible via the PATH, and that where dbt resolves to the correct location.
  • Check the Claude Code logs for any errors or warnings related to LSP tool registration.
  • Try running the dbt lsp command manually to ensure it works as expected.

Example

No code snippet is provided as the issue seems to be related to configuration and tool registration.

Notes

The issue may be specific to the dbt-fusion native binary and the way it interacts with Claude Code. Further investigation may be needed to determine the root cause.

Recommendation

Apply workaround: Verify the .lsp.json configuration and dbt.exe installation, and try running the dbt lsp command manually to troubleshoot the issue.

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 LSP tool not registered on Windows even with native LSP-server binary [1 comments, 2 participants]