Metraipolis › archive › dc_64bee6712ef5

Does a Language Server Save Tokens for Coding Agents? A Measurement Methodology and Preliminary Study — arXiv:2608.13568

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.13568
License (as archived)
CC0-1.0
Archived
2026-10-19T02:20:55.045Z
SHA-256 of the archived text
8fb9b7286cc146ee4da1d5e353c674a67e09acf5f31a66be04f5c774224f314a
Stable URL of this page
https://metraipolis.com/documento/dc_64bee6712ef5

How to cite

Does a Language Server Save Tokens for Coding Agents? A Measurement Methodology and Preliminary Study — arXiv:2608.13568 — arXiv (en), https://arxiv.org/abs/2608.13568 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_64bee6712ef5 (Metraipolis archive dc_64bee6712ef5, sha256 8fb9b7286cc146ee4da1d5e353c674a67e09acf5f31a66be04f5c774224f314a)
BibTeX
@misc{dc64bee6712ef5,
  title = {Does a Language Server Save Tokens for Coding Agents? A Measurement Methodology and Preliminary Study — arXiv:2608.13568},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.13568},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_64bee6712ef5; sha256 8fb9b7286cc146ee4da1d5e353c674a67e09acf5f31a66be04f5c774224f314a},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.13568. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Coding agents spend most of their context budget on retrieval. Lexical retrieval (grep) is universal, instant, and zero-setup, but noisy: it cannot tell a definition from a call from a comment. Semantic retrieval via the Language Server Protocol (LSP) is precise and typed, but needs a running, indexed server and pays a per-symbol round-trip. The claim that semantic retrieval is more token-efficient is, we find, asserted almost everywhere and measured almost nowhere: no public source isolates the LSP-vs-lexical token delta for an agent at equal task-success. This paper formalizes the question with one metric (tokens-to-success), specifies a five-arm ablation isolating semantic retrieval from confounds, maps three pre-stated failure modes onto measurable variables, and reports a preliminary study (Python and TypeScript repos; Claude Opus 4.8, Sonnet 4.6, Haiku 4.5). The answer is conditional and usually negative. On symbol-named localization the LSP costs tokens (+6% to +118%) and the agent ignores it when free. On reference-completeness it buys precision but not token savings and cannot raise the recall ceiling set by agent thoroughness; it saves tokens only for the weakest model. Tool choice is task-dependent: models default to grep on localization (0-6% semantic use) but reach for the LSP about half the time on reference tasks, unprompted. On edits scored by real test execution the gap is starkest: grep solves multi-file renames perfectly, a location-only LSP fails three-quarters of them by missing a call site, and even a complete, index-warmed, text-enriched LSP (each reference's line inline, as production LSP-MCP servers do) recovers most of the gap but cannot close it, since a rename must touch comments and strings that semantic references exclude. The implication is not LSP-always but an adaptive router keyed on task class, model capability, and lexical noise.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-08-17 in cs.AI).
Categorie arXiv: Computation and Language (cs.CL) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2608.13568 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-19T02:02:02.835Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-08-17?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).