返回资讯中心
外部精选
软件工程
#开发者实时流

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

Hacker News 最新anirudhak2026/11/5 · 今天9 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

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

Pratyush Saini, CTO, ByteAsk Research; Anirudha Kulkarni, CEO, ByteAsk · [email protected] · [email protected] · November 4, 2026 · Preprint · 13 pages

Download PDFCiteCode and sample tasks

Key findings

01Left 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.

02The configured workflow resolved 270 of 359 repair attempts against 275 without it, at 11% higher API cost (95% CI 8% to 15%).

03On 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.

04From 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.

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}} }

Copy

Questions about the study: [email protected]← All research

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →