LSP proxy plugins that filter diagnostic noise from Claude Code
npx claudepluginhub iloom-ai/stay-fresh-lsp-proxyTypeScript/JavaScript LSP with diagnostic filtering via stay-fresh proxy
Python (Pyright) LSP with diagnostic filtering via stay-fresh proxy
Rust LSP with diagnostic filtering via stay-fresh proxy
Stop stale LSP diagnostics from derailing your Claude Code sessions.
Note: This is a temporary workaround for issues with how Claude Code handles LSP diagnostics. Once the underlying problems are fixed upstream, this plugin will no longer be necessary. Relevant issues:
Claude Code's LSP plugins fire textDocument/publishDiagnostics after every edit. The diagnostics arrive from the previous state of the file — not the current one. Claude sees these stale errors, thinks the code is broken, and tries to "fix" problems that don't exist. This leads to:
The root cause is a timing issue: diagnostics lag behind edits, so Claude is always reacting to the previous state of your code.
stay-fresh-lsp-proxy sits between Claude Code and your LSP server. It forwards everything normally (go-to-definition, hover, references, completions) but intercepts textDocument/publishDiagnostics notifications and filters them before they reach Claude. No stale diagnostics, no confused AI.
npx stay-fresh-lsp-proxy setup --typescript --python --rust
Pick only the languages you need:
npx stay-fresh-lsp-proxy setup --typescript # Just TypeScript/JS
npx stay-fresh-lsp-proxy setup --typescript --python # TypeScript + Python
npx stay-fresh-lsp-proxy setup --rust # Just Rust
This will:
| Language | LSP Server | Install the server |
|---|---|---|
| TypeScript/JS | typescript-language-server | npm i -g typescript-language-server typescript |
| Python | pyright-langserver | npm i -g pyright |
| Rust | rust-analyzer | rustup component add rust-analyzer |
The setup script will warn you if the required LSP server binary is not found in your PATH.
Control filtering behavior with environment variables. Set them in ~/.claude/settings.json under env:
{
"env": {
"STAY_FRESH_DROP_DIAGNOSTICS": "true",
"STAY_FRESH_MIN_SEVERITY": "1",
"STAY_FRESH_LOG": "false"
}
}
| Variable | Default | Description |
|---|---|---|
STAY_FRESH_DROP_DIAGNOSTICS | true | Drop all diagnostics. Set to false to use severity filtering instead. |
STAY_FRESH_MIN_SEVERITY | 1 | When not dropping all, the maximum severity level to keep. 1 = only errors, 2 = errors + warnings, 3 = errors + warnings + info, 4 = everything (same as no filter). |
STAY_FRESH_LOG | false | Enable debug logging to $TMPDIR/stay-fresh-lsp-proxy/. |
Drop everything (default) — The nuclear option. Eliminates all stale diagnostics completely. Claude keeps full LSP intelligence (go-to-definition, hover, etc.) but never gets misleading error reports mid-edit.
{
"env": {
"STAY_FRESH_DROP_DIAGNOSTICS": "true"
}
}
Errors only — Let genuine errors through (type mismatches, missing imports, syntax errors) but suppress warnings, hints, and info. Good if you want Claude to catch real breakage while ignoring the noise.
{
"env": {
"STAY_FRESH_DROP_DIAGNOSTICS": "false",
"STAY_FRESH_MIN_SEVERITY": "1"
}
}
Errors + Warnings — Also keep warnings (unused variables, deprecated APIs) but drop hints and info. You'll still get some stale notifications, but you're trading that off against Claude occasionally catching real issues it wouldn't otherwise notice.
{
"env": {
"STAY_FRESH_DROP_DIAGNOSTICS": "false",
"STAY_FRESH_MIN_SEVERITY": "2"
}
}
Everything except hints — Only drop hint-level diagnostics (like pyright's "unnecessary" markers that prompted #26634). Closest to stock behavior with the worst offenders removed.
{
"env": {
"STAY_FRESH_DROP_DIAGNOSTICS": "false",
"STAY_FRESH_MIN_SEVERITY": "3"
}
}