
If Claude Code LSP is not working, the most common cause is a missing language server program. The code intelligence plugin only tells Claude Code which command to run, such as typescript-language-server, and you install that program yourself. When it isn’t on your PATH, Claude Code shows “Executable not found in $PATH” and Claude never gets diagnostics.
To check it, ask Claude to edit a file in that language and look for a line like Found 1 new diagnostic issue in 1 file under the edit. If that line never shows up, run /plugin and open the Errors tab. It names the exact reason, and the fix is usually to install the binary and start a new session.
In our test we also hit two less obvious failures: a server that starts and then quits, and a broken .lsp.json file. This guide shows each one with real screenshots and the fix that worked.
Browse all our Claude Code tutorials for more fixes and how-tos.
Tested with Claude Code v2.1.332 on macOS on December 4, 2026. We used a tiny throwaway TypeScript project and loaded Anthropic’s official typescript-lsp plugin (from the claude-plugins-official repo, commit e599fbc) with --plugin-dir, which runs the same plugin for one session.
The language server was typescript-language-server 6.1.0. Items marked as coming from the docs follow Anthropic’s official documentation.
Quick Summary: Why Claude Code LSP Is Not Working
Find what you see in the first column. Rows marked “Tested” are failures we reproduced ourselves.
| What you see | Likely cause | Fix | How we checked it |
|---|---|---|---|
| No diagnostics line, no LSP tool calls | No code intelligence plugin for that language | Install the plugin, for example typescript-lsp | From the official docs |
| “Executable not found in $PATH” | The language server binary isn’t installed or isn’t on PATH | Install it, check with which, start a new session | Tested |
| “couldn’t start. The Errors tab in /plugin may have the reason” | The server starts but quits during setup | Read the reason with claude --debug | Tested |
| “provides no tsserver.js” in the debug log | TypeScript 7.0.2 has no tsserver.js for the server to use | Install TypeScript 6 in the project | Tested |
| “Invalid LSP server config for .lsp.json” | A wrong or missing key in a custom plugin | Use command and extensionToLanguage | Tested |
| “is not used for .ts files” | Two servers claim the same extension | Disable one of the two plugins | Tested |
| No diagnostics in a cloud session | Cloud sessions don’t start plugin language servers | Use a terminal session | From the official docs |
How LSP Works in Claude Code
LSP stands for Language Server Protocol. It’s the same system your code editor uses to underline type errors and jump to a function’s definition. Claude Code can talk to these servers too, through code intelligence plugins.
The code intelligence docs list official plugins for 13 languages, including TypeScript, Python (pyright-lsp), Go (gopls-lsp), Rust (rust-analyzer-lsp) and C/C++ (clangd-lsp). Each plugin connects one language server. You install the plugin from the official marketplace and the server binary on your own machine.
When it works, Claude gains two things. After each edit it gets the errors and warnings the server reports, and it gets an LSP tool that can find definitions and references by symbol instead of by text search.

One detail trips people up: the server doesn’t start when Claude Code opens. It starts the first time Claude edits a file with one of the plugin’s extensions. In our test, the /plugin Errors tab said “No plugin errors” at launch even though the binary was missing, and the error only appeared after the first edit.
No edit, no language server. Always test LSP by having Claude change a real file.
How to Check If LSP Is Working in Claude Code
The official check is simple. Ask Claude to put a type error in a file and then fix it, and watch the output under the edit.
In our working session we asked Claude to change a price from the number 2 to the string "2". Right under the edit, Claude Code printed Found 1 new diagnostic issue in 1 file (ctrl+o to expand). That line is your proof the server is running.

Press Ctrl+O to read the issues themselves. Claude then fixed the error using what the server told it: Type 'string' is not assignable to type 'number'.
You can also test the LSP tool directly. We asked Claude to find every reference to a function, and it called the tool with findReferences and found 3 references across 2 files.

If you see neither the diagnostics line nor any LSP(...) calls, something in the chain is broken. Work through the fixes below in order.
Fix 1: Install the Code Intelligence Plugin
The tools reference says Claude Code keeps the LSP tool inactive until you install a code intelligence plugin for your language. So with no plugin, nothing happens and no error appears.
In a terminal session, install the plugin for your language from inside Claude Code:
/plugin install typescript-lsp@claude-plugins-officialSwap typescript-lsp for your language’s plugin, such as pyright-lsp or gopls-lsp. The confirmation message says whether the plugin is active now or needs /reload-plugins. Our guide to managing plugins covers scopes and updates, and the LSP plugins guide walks through all 12 Anthropic-made language plugins.
If the install fails with Marketplace "claude-plugins-official" not found, the docs point to a separate troubleshooting entry for adding the official marketplace. Our explainer on plugin marketplaces shows how marketplaces work.
Fix 2: “Executable not found in $PATH”
This is the error you’ll most likely see. We loaded the TypeScript plugin without installing typescript-language-server and asked Claude for a one-line comment in a .ts file. The edit worked, and then Claude Code printed a yellow warning that the server’s program wasn’t found.

The /plugin Errors tab gave the same reason in its standard form: Executable not found in $PATH: "typescript-language-server". The quoted name is the binary you need.

How to fix it
- Open the plugin’s README (linked from the docs table) to find the install command. For TypeScript it is
npm install -g typescript-language-server typescript. - Check that the binary is on the
PATHof the shell you startclaudefrom, withwhich typescript-language-server(orGet-Commandin PowerShell). - Start a new Claude Code session from that same shell, then ask Claude to edit a matching file again.
Here is what that check looked like for us. The first which found nothing, and after we added the server’s folder to PATH it found the binary and printed version 6.1.0.

A common trap is installing the binary in one terminal and running claude from another. The docs say Claude Code starts the server by name from the PATH it was launched with, so if you used a version manager or a custom folder, open a fresh terminal where which finds it.
Fix 3: The Server Starts, Then Quits
This one surprised us. With typescript-language-server on PATH, Claude Code still printed “couldn’t start. The Errors tab in /plugin may have the reason.” Claude even told us it never received any diagnostics and had to run the TypeScript compiler by hand.

Find the real reason with –debug
The plugin troubleshooting page says claude --debug logs these failures as LSP server <name> failed to start. We used --debug-file to save each session’s log to a file, then searched it:
claude --debug-file lsp.log
grep "LSP server" lsp.logThe log showed two different failures from our runs. The first time, the server couldn’t find any TypeScript at all. After we added TypeScript to the project, it found TypeScript 7.0.2, the version npm installed by default on our test date, and quit because that version provides no tsserver.js.

How to fix it
For TypeScript, the server needs a TypeScript package that still ships tsserver.js. Installing TypeScript 6 in the project fixed it for us:
npm install --save-dev typescript@6After that, the log said LSP server instance started and diagnostics came through on the next edit. For other languages the reason will differ, but the method is the same: read the debug log, fix what it names, and start a new session. If you’re moving a project to TypeScript, our TypeScript conversion tutorial shows a full setup.
Fix 4: Invalid LSP Server Config in a Custom Plugin
If you wrote your own .lsp.json for a language with no official plugin, one wrong key breaks the whole file. The plugin components docs warn that an invalid file still passes claude plugin validate, so you only see the problem after loading it.
We tested this with a demo plugin that used cmd instead of command. The Errors tab showed Invalid LSP server config for ".lsp.json", listed the unrecognized key, and Claude Code skipped the file.

A valid entry maps the server name straight to its settings, with no wrapper object. Only command and extensionToLanguage are required:
{
"lua": {
"command": "lua-language-server",
"extensionToLanguage": { ".lua": "lua" }
}
}Each extension key must start with a dot. The plugins reference lists the optional fields, such as args, env, startupTimeout and restartOnCrash, and says any unknown key fails validation. Our guide to creating plugins covers the rest of the plugin folder.
Fix 5: Two Servers Claim the Same Extension
Each file extension gets exactly one language server. If two enabled plugins both handle .ts, the first one registered wins and the other is ignored for those files.
We loaded a second demo plugin that also claimed .ts. The Errors tab showed a warning that its server “is not used for .ts files” because typescript-lsp already registered one, and suggested disabling one plugin.

Fix it by disabling the plugin you don’t want with /plugin disable <plugin>. If you’re not sure which plugins are on, our post on skills versus plugins explains where each one comes from.
Other Reasons LSP Isn’t Working
A few cases come straight from the official docs rather than our test, so we list them separately.
- Cloud sessions: Claude Code doesn’t start plugin language servers in web sessions of Claude Code, so there are no diagnostics or LSP calls there.
- High memory use: servers such as
rust-analyzerandpyrightindex the whole project. The docs suggest/plugin disable <plugin>and relying on Claude’s built-in search. - False errors in a monorepo: a server not set up for your workspace can report internal imports as unresolved. The docs say there’s nothing to fix on the Claude Code side, and it doesn’t stop Claude from editing.
- Slow servers: a request the server never answers fails after 60 seconds by default (
requestTimeout, v2.1.288 or later).
Here is the whole troubleshooting path in one picture.

The LSP Plugin Recommendation Dialog
In our working session a dialog titled “LSP plugin recommendation” popped up after Claude edited a .ts file. The docs say it appears when a matching server binary is on your PATH but the plugin that uses it isn’t installed.

Choosing “Yes, install” installs the plugin for your user account, and you start a new session to load the server. “Not now” or Esc closes it for this session only.
If you ignore it, it closes after 30 seconds, and after five ignored dialogs Claude Code stops recommending plugins. To turn recommendations back on, the docs say to remove the lspRecommendationDisabled and lspRecommendationIgnoredCount keys from ~/.claude.json. A plugin you blocked with “Never for this plugin” sits in the lspRecommendationNeverPlugins list in the same file.
Try It Yourself
Once you’ve installed a plugin and its binary, run this test in a small project. It proves both diagnostics and the LSP tool work in under a minute.
In one file, change a number value to a string so it causes a type error.
Make only that edit, then fix the error the language server reports.
After that, use the LSP tool to find every reference to one function.You should see the Found N new diagnostic issues line after the first edit and an LSP(operation: "findReferences" ...) call at the end. If not, open /plugin and check the Errors tab.
Common Mistakes
- Installing only the plugin. The plugin doesn’t include the server binary, so you need both.
- Checking the Errors tab before any edit. The server starts lazily, so the tab looks clean until Claude edits a matching file.
- Keeping the old session open. After installing a binary, start a new session from a shell where
whichfinds it. - Assuming the server is fine because it’s on
PATH. It can still quit during setup, as TypeScript 7.0.2 showed us. - Trusting
claude plugin validatefor.lsp.json. An invalid file still passes it.
Pro Tips
- Use
--debug-fileto save the log somewhere easy to search, instead of scrolling past it. - Look for the line
LSP server instance startedin the log. It’s the clearest sign the server is healthy. - For TypeScript, the server checks the project’s own
typescriptpackage first, so pin a working version inpackage.json. - If a server eats memory on a big repo, disable that plugin per project rather than uninstalling it.
- Run the /doctor check too when plugins behave oddly in general.
Claude Code LSP Fix Cheat Sheet

For other error messages, see our list of common errors in Claude Code.
Frequently Asked Questions
How do I know if LSP is working in Claude Code?
Ask Claude to edit a file in that language. If a line like Found 1 new diagnostic issue in 1 file appears under an edit that caused an error, or Claude makes LSP(...) calls, the server is running.
Why does Claude Code say “Executable not found in $PATH”?
The plugin is installed, but the language server program it names isn’t on your PATH. Install the binary from the plugin’s README, confirm it with which, and start a new session from that shell.
Does Claude Code install the language server for me?
No. The plugin only tells Claude Code which command to run and which file types it covers. You install the server binary yourself.
Why is there no error in /plugin even though LSP isn’t working?
The server only starts when Claude first edits a matching file, so the Errors tab stays empty before that. If there’s still no error after an edit, check that a plugin for your language is installed at all.
Does LSP work in Claude Code on the web?
No. The docs say cloud sessions don’t start plugin language servers, so code intelligence only works in terminal sessions. You can read more about the model behind it on our Claude AI page.
Conclusion
When Claude Code LSP is not working, check it the official way: have Claude edit a file and look for the diagnostics line, then open the /plugin Errors tab if it’s missing. In our test the fixes were clear once we saw the reason: install the plugin, put the server binary on your PATH and start a new session, read claude --debug when the server quits during setup (for TypeScript, pin version 6), and fix bad .lsp.json keys or duplicate extensions in the Errors tab.


