cd /news/ai-agents/why-lsp-why-the-lsp-plugin-and-why-c… · home › topics › ai-agents › article
[ARTICLE · art-164198] src=byteask.ai ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Why LSP, Why the LSP Plugin, and Why Claude Code Doesn't Save Tokens

A ByteAsk Research preprint by Pratyush Saini and Anirudha Kulkarni found that a configured clangd language-server workflow for Claude Code (Claude Opus 5.5) resolved 270 of 359 C/C++ repair attempts versus 275 without it (p = 0.41) while using 19% more tokens and 11% more API cost (95% CI 8% to 15%). Left optional, the LSP tool 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. On 29 constructed change requests with same-name decoys, plain Claude Code found 96.6% of callers by reading code, and requiring the server added 0.6 points of recall at 1.11 times the cost.

read3 min views5 publishedNov 5, 2026
Why LSP, Why the LSP Plugin, and Why Claude Code Doesn't Save Tokens
Image: source

Language Servers, Grep, and the Cost of Code Navigation for C/C++ Coding Agents

Key findings #

  1. Left optional, the LSP tool was called in 5% of runs. Required, 89% of its calls were name lookups, and grep stayed in 70% of runs.
  2. The configured workflow resolved 270 of 359 repair attempts against 275 without it, at 11% higher API cost (95% CI 8% to 15%).
  3. On 29 change requests where grep returns same-name decoys, plain Claude Code found 96.6% of the callers by reading; requiring the server added 0.6 points at 1.11 times the cost.
  4. From the issue alone, without the repository, the model names every fix site for 126 of 255 issues (in two of three tries), so public C++ benchmarks leave little room to measure a navigation tool.

Abstract #

Language-server (LSP) plugins promise coding agents compiler-accurate navigation and lower token use. We tested that promise in C and C++, running Claude Code (Claude Opus 5.5) as shipped and with a configured clangd workflow (Anthropic's plugin, a pre-built index and an instruction to find symbols with it) on 255 issues from 40 repositories, including Multi-SWE-bench C++ and bugs fixed after the model's training cutoff. 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 the calls were name lookups, and grep stayed in 70%. Across 359 repair attempts the configured workflow resolved 270 against 275 (p = 0.41), and across all 614 task-tier pairs it used 19% more tokens at 11% higher API cost (95% CI 8% to 15%); with Claude Sonnet 5.5 on 122 Multi-SWE-bench edit-only tasks, cost also rose (×1.15) without a detectable repair gain. The server shortened search results, but the agent consumed more file content and made more model calls: re-reads were 94% of the extra tokens and 28% of the estimated extra API cost. On 29 constructed change requests whose answer is one overload's callers among same-name decoys (gold from clangd's references, scored by file and function name, after a post-run correction), the plain agent found 96.6% of the callers by reading the code; requiring the server changed task-averaged recall by +0.6 points (95% CI 0.0 to 1.7) at ×1.11 the cost. These results concern the deployed workflow, including its instructions. From the issue alone, without the repository, the model names every target site of 126 of our 255 issues (in two of three tries), and only 30 of 359 repair pairs showed any outcome variation within or between arms over the available runs. We also report fixes leaked in issue texts, grading hazards in the official harness, and a checklist.

Where the tokens and the dollars go #

Cite #

Pratyush Saini and Anirudha Kulkarni. Why LSP, Why the LSP Plugin, and Why Claude Code Doesn't Save Tokens. ByteAsk Research, preprint, November 2026. byteask.ai/research/lsp-claude-code-cpp

@misc{saini2026lsp,
  title        = {Why LSP, Why the LSP Plugin, and Why Claude Code Doesn't Save Tokens: Language Servers, Grep, and the Cost of Code Navigation for C/C++ Coding Agents},
  author       = {Saini, Pratyush and Kulkarni, Anirudha},
  year         = {2026},
  month        = nov,
  institution  = {ByteAsk Research},
  howpublished = {\url{https://byteask.ai/research/lsp-claude-code-cpp}},
  note         = {Preprint. Code and sample tasks: \url{https://github.com/ByteAsk/lsp-claude-code-cpp}}
}

Questions about the study: [email protected] All research

── more in #ai-agents 4 stories · sorted by recency
── more on @byteask research 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/why-lsp-why-the-lsp-…] indexed:0 read:3min 2026-11-05 · —