Why LSP, Why the LSP Plugin, and Why Claude Code Doesn't Save Tokens
ByteAsk Research found that a clangd workflow in Claude Code resolved 270 of 359 C/C++ repairs versus 275 without it, at an estimated 11% higher API cost.
By Dillip Chowdary β’ Nov 06, 2026 β’ Source: byteask.ai
ByteAsk Research published a November 2026 preprint, byteask.ai's report, titled "The Language Server Tax: More Cost Without Better C/C++ Code Repair." Pratyush Saini and Anirudha Kulkarni compared Claude Code (Claude Opus 5.5) as shipped with a configured clangd workflow. That workflow resolved 270 of 359 repair attempts, and the shipped agent resolved 275.
This piece is for developers enabling an LSP plugin for compiler-accurate navigation and lower token use. It covers server call rates, token totals, estimated API cost, and same-name callers across 255 issues from 40 repositories, including Multi-SWE-bench C++ and bugs fixed after the model's training cutoff.
What shipped in LSP
Claude Code as shipped, on Claude Opus 5.5, is the plain arm in this comparison. The other arm is a clangd workflow: Anthropic's plugin, a pre-built index, and an instruction to find symbols with the server. Language-server plugins promise coding agents compiler-accurate navigation and lower token use. Tests ran in C and in C++ on both arms. Saini and Kulkarni say the results concern this deployed workflow, including its instructions. The citation names the code and sample tasks as ByteAsk/lsp-claude-code-cpp.
The pool is 255 C and C++ issues from 40 repositories, including Multi-SWE-bench C++ and bugs fixed after the model's training cutoff. Navigation was scored on 30 tasks, and each task was run twice. Repair was scored on 359 attempts. Tokens and estimated API cost both cover all 614 task-tier pairs. A separate pass runs Claude Sonnet 5.5 on 122 Multi-SWE-bench edit-only tasks. The LSP arm keeps the same agent and adds the plugin, the index, and the symbol instruction.
What improved in LSP
The server shortened search results. The configured workflow resolved 270 of 359 repair attempts, and plain Claude Code resolved 275 (p = 0.41). Across 614 task-tier pairs the LSP arm used 19% more tokens at an estimated API cost 11% higher, 95% confidence interval 8% to 15%. Claude Sonnet 5.5 on 122 Multi-SWE-bench edit-only tasks cost 1.15 times as much, with no detectable repair gain. Figure 2 shows that average run, plain against LSP, counting each part every time a call reads it.

Extra file content and extra model calls remained alongside the shorter searches. Re-reads were 94% of the extra tokens and 28% of the estimated extra API cost. On 29 constructed change requests the answer is one overload's callers among same-name decoys. Gold labels are clangd's references, scored by file and function name after a post-run correction. Plain Claude Code found 96.6% of the callers by reading the code. Requiring the server changed task-averaged recall by 0.6 points, 95% confidence interval 0.0 to 1.7, at 1.11 times the cost.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
| Measure | Shipped Claude Code | Configured clangd workflow |
|---|---|---|
| Repairs resolved, of 359 | 275 | 270 (p = 0.41) |
| Tokens, 614 task-tier pairs | shipped | 19% more |
| Estimated API cost, 614 pairs | shipped | 11% higher (95% CI 8% to 15%) |
| Sonnet 5.5 cost, 122 edit-only tasks | shipped | 1.15 times |
| Caller recall, 29 change requests | 96.6% | +0.6 points at 1.11 times the cost |
What you gain from LSP
On 30 navigation tasks run twice, an optional server was called in 5% of runs. Required, it was called in 96% of runs. Of those calls, 89% were name lookups, and grep stayed in 70% of runs, so text search is still present when clangd is mandatory. On 29 change requests where grep returns same-name decoys, plain Claude Code found 96.6% of the callers by reading the code. Requiring the server added 0.6 points of task-averaged recall at 1.11 times the cost.
From the issue alone, without the repository, the model names every fix site for 126 of 255 issues, in two of three tries. The preprint says public C++ benchmarks leave little room to measure a navigation tool. Only 30 of 359 repair pairs showed any outcome variation within or between arms over the available runs. After snippets get shorter, re-reads still make up 94% of the extra tokens and 28% of the estimated extra API cost relative to the shipped agent.
How to get LSP
The study ran Claude Code as shipped on Claude Opus 5.5, then added Anthropic's plugin, a pre-built index, and an instruction to find symbols with clangd. Saini and Kulkarni apply the findings to that deployed workflow, including its instructions. The write-up is the November 2026 ByteAsk Research preprint, and the code and the sample tasks are ByteAsk/lsp-claude-code-cpp. Claude Sonnet 5.5 is the other model, used on 122 Multi-SWE-bench edit-only tasks at 1.15 times the cost, with no detectable repair gain.
Estimated API cost is the price comparison in the preprint. On 614 task-tier pairs the configured arm cost 11% more, 95% confidence interval 8% to 15%, and used 19% more tokens. The 29 caller tasks cost 1.11 times the plain arm. Requiring the server produces the 96% call rate, and leaving the tool optional produces calls in 5% of runs. The preprint page lists a contact for questions about the study. Plugin, pre-built index, and symbol instruction are the three pieces those costs belong to.
What to watch after LSP
The preprint reports fixes leaked in issue texts, grading hazards in the official harness, and a checklist. With no repository attached, the model names every target site for 126 of 255 issues, in two of three tries. Only 30 of 359 repair pairs showed any outcome variation within or between arms over the available runs. The 255 issues come from 40 repositories and include Multi-SWE-bench C++ plus bugs fixed after the model's training cutoff, and the repair comparison sits at p = 0.41.
Figure 2 puts tokens on the left of the average run and estimated API cost on the right, counting each part every time a call reads it. Shorter search results left extra file content, output, and calls in that average. Re-reads were 94% of the extra tokens and 28% of the estimated extra API cost. On the 29 decoy tasks, labels came from clangd's references and were scored by file and function name after a post-run correction. The shipped agent reached 96.6% of those callers.
Developer Action Items
- β Diff the official changelog for Anthropic / Claude / Sonnet 5.5 before you bump β APIs, defaults, and removed flags only.
- β Install through the vendor's documented channel in staging; keep a one-command rollback and time-box the canary.
- β Grep your repo for old flag names, lockfile pins, and plugin versions that the notes mark as breaking.
- β Prefer the first patch cut over the day-zero tag unless you have a reason to be on the leading edge.
- β If HN Claude/Codex/Fable did not name a region, plan, or SKU, screenshot the official availability line before you promise it to users.
LSP FAQ
Did the clangd workflow lower token use in Claude Code?
Across 614 task-tier pairs it used 19% more tokens at an estimated API cost 11% higher (95% confidence interval 8% to 15%). Re-reads were 94% of the extra tokens and 28% of the estimated extra API cost.
How many C and C++ repairs did the configured workflow resolve?
It resolved 270 of 359 repair attempts, and plain Claude Code resolved 275 (p = 0.41). Claude Sonnet 5.5 on 122 Multi-SWE-bench edit-only tasks showed no detectable repair gain at 1.15 times the cost.
How often does Claude Code call an optional LSP server?
On 30 navigation tasks run twice, an optional server was called in 5% of runs. Required, it was called in 96% of runs, 89% of those calls were name lookups, and grep stayed in 70% of runs.
Can Claude name every fix site from the issue text alone?
From the issue alone, with no repository, the model named every target site for 126 of 255 issues, in two of three tries. Only 30 of 359 repair pairs showed any outcome variation within or between arms.
What did the same-name caller test find?
On 29 constructed change requests, plain Claude Code found 96.6% of the callers by reading. Requiring the server changed task-averaged recall by 0.6 points (95% confidence interval 0.0 to 1.7) at 1.11 times the cost.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement