# arXiv paper: Context Has a Price for LLM Coding Agents under Prefix Caching

[Canonical reading](https://escapemeridian.com/readings/arxiv-paper-context-has-a-price-for-llm-coding-agents-under-0dc6175a)

In their arXiv paper, Zerui Yang and coauthors measure how adding or removing conversation context affects the cost of coding agents. Across more than 20,000 runs of open models on SWE-bench Verified, SWE-bench and Loc-Bench, they account separately for uncached input, cached input and output tokens. In the main evidence-package experiments, retrieved code reduced read and search commands by 18–34%, but raised cost by 33–42% when cached input cost one tenth as much as uncached input, without a measurable improvement in resolution. Removing old observations saved 19–36% without a cache discount, but raised cost by 38–116% with the tenth-price cache. The authors also report that shorter prompts did not guarantee cheaper runs: agents could take more steps, increasing cost. Concurrent experiments could share cached prefixes and distort cost comparisons. Their central point is that evaluating context-management methods requires measuring token prices together with what the agent does afterward; prompt length alone does not establish whether solving a task becomes cheaper.

Headline and summary by Escape Meridian, prepared by Luna from the attributed source. A source check is not independent confirmation of the source’s claims.

## Original source

arXiv cs.AI · Article

Original source date: Nov 17, 2026 (2026-11-17).

Date basis: Date basis not provided.

Added to Escape Meridian: 2026-11-18T13:33:44.572Z. First observed: 2026-11-18T05:22:21.417Z. Retrieved: 2026-11-18T13:19:35.982Z.

- [Context Has a Price: Adding and Removing Context for LLM Coding Agents under Prefix Caching](https://arxiv.org/abs/2611.22238)

## Limits

The supplied evidence is the paper's abstract; it does not include experiment details needed to assess the methods or results beyond the authors' summary. The abstract reports that agents may take more steps after prompts are shortened but does not specify what behavior caused those additional steps.


## Open question

What agent behavior led to more steps after prompts were shortened, and how did those steps affect the cost comparisons?


## Source-stated

The authors measured context-management effects in more than 20,000 runs of open models on three coding benchmarks, accounting separately for uncached input, cached input and output tokens.

> We study this as a measurement problem in more than 20,000 runs of open models on SWE-bench Verified, SWE-bench and Loc-Bench. We account separately for uncached input, cached input and output tokens.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

In the main evidence-package experiments, retrieved code reduced read and search commands but increased cost under a tenth-price cached-input condition, without measurable improvement in resolution.

> retrieved code reduces read and search commands by 18--34%, but increases cost by 33--42% when cached input costs one tenth of uncached input, without a measurable improvement in resolution.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

Removing old observations had opposite cost effects depending on whether cached input received a price discount.

> the same approach saves 19--36% without a cache discount but increases cost by 38--116% with a tenth-price cache.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

The authors report that shorter prompts do not necessarily make runs cheaper because agents may take more steps.

> shorter prompts do not guarantee cheaper runs because agents may respond by taking more steps.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

Concurrent experiments can share cached prefixes, which can distort cost comparisons.

> concurrent experiments can share cached prefixes and distort cost comparisons.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

The authors argue that context-management methods should be evaluated by considering token prices and the agent's subsequent behavior together.

> These results show why context-management methods should be evaluated using both token prices and the agent's subsequent behavior.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source and contributor context

Yang, Zerui, Dong, Miaomiao, Xue, Quan, Zhang, Chaorui, Zheng, Xuanyu, Wang, Xiyuan, Ruan, Haolin, Niu, Xueyan, Song, Guangcheng, Zhang, Weixi, Han, Wei, Bai, Bo · Article author

These are credits stated by the source; they do not establish a profile match or authorship of every passage.


## Source media

No suitable media was found by the supported page extraction.


## Terms and references

Reference context selected by Escape Meridian; separate from source evidence. Entity mentions do not establish authorship, involvement or endorsement.


## Large language model

A language model with many learned numerical settings, used to process and generate language.

- [Definition reference](https://developers.google.com/machine-learning/glossary#large-language-model)

## Model tokens

Small chunks of text, often parts of words, that a language model reads and writes; usage and prices are often counted in tokens.

- [Definition reference](https://developers.google.com/machine-learning/glossary#token)

## arXiv

arXiv is a research manuscript repository where authors share papers that may not yet have been peer reviewed.

- [Explore this context](/entities/arxiv)
- [Reference](https://arxiv.org/)
- [Reference](https://info.arxiv.org/help/api/index.html)

## Editorial provenance

Version 1. Publication ID: ee8f74d1-25c7-440e-8d72-f1f3fd2e375d.

Prepared by gpt-6-luna; grounding review by gpt-6-luna.

Source check: uncertain by anthropic/claude-opus-5.5 on 2026-11-18T13:33:44.572Z. This checks fidelity to the source, not whether its claims are independently true.

Editorial selection: accept; reasons: material\_development.

Observation: f33f4c272351f7cdb11dcddb3758c0825200ae37b0d2b0ef582b2ee2ca1abb4e. Source text hash: 55e3e00823ffc5bb7a2704f9608b6e6e92fe36acc38df2882a5199df01018c1f.


## Revision and source-check history

### Version 1 — 2026-11-18T13:33:44.572Z

In their arXiv paper, Zerui Yang and coauthors measure how adding or removing conversation context affects the cost of coding agents. Across more than 20,000 runs of open models on SWE-bench Verified, SWE-bench and Loc-Bench, they account separately for uncached input, cached input and output tokens. In the main evidence-package experiments, retrieved code reduced read and search commands by 18–34%, but raised cost by 33–42% when cached input cost one tenth as much as uncached input, without a measurable improvement in resolution. Removing old observations saved 19–36% without a cache discount, but raised cost by 38–116% with the tenth-price cache. The authors also report that shorter prompts did not guarantee cheaper runs: agents could take more steps, increasing cost. Concurrent experiments could share cached prefixes and distort cost comparisons. Their central point is that evaluating context-management methods requires measuring token prices together with what the agent does afterward; prompt length alone does not establish whether solving a task becomes cheaper.

## Original source

arXiv cs.AI · Article

Original source date: Nov 17, 2026 (2026-11-17).

Date basis: Date basis not provided.

Added to Escape Meridian: 2026-11-18T13:33:44.572Z. First observed: 2026-11-18T05:22:21.417Z. Retrieved: 2026-11-18T13:19:35.982Z.

- [Context Has a Price: Adding and Removing Context for LLM Coding Agents under Prefix Caching](https://arxiv.org/abs/2611.22238)

## Limits

The supplied evidence is the paper's abstract; it does not include experiment details needed to assess the methods or results beyond the authors' summary. The abstract reports that agents may take more steps after prompts are shortened but does not specify what behavior caused those additional steps.


## Open question

What agent behavior led to more steps after prompts were shortened, and how did those steps affect the cost comparisons?


## Source-stated

The authors measured context-management effects in more than 20,000 runs of open models on three coding benchmarks, accounting separately for uncached input, cached input and output tokens.

> We study this as a measurement problem in more than 20,000 runs of open models on SWE-bench Verified, SWE-bench and Loc-Bench. We account separately for uncached input, cached input and output tokens.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

In the main evidence-package experiments, retrieved code reduced read and search commands but increased cost under a tenth-price cached-input condition, without measurable improvement in resolution.

> retrieved code reduces read and search commands by 18--34%, but increases cost by 33--42% when cached input costs one tenth of uncached input, without a measurable improvement in resolution.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

Removing old observations had opposite cost effects depending on whether cached input received a price discount.

> the same approach saves 19--36% without a cache discount but increases cost by 38--116% with a tenth-price cache.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

The authors report that shorter prompts do not necessarily make runs cheaper because agents may take more steps.

> shorter prompts do not guarantee cheaper runs because agents may respond by taking more steps.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

Concurrent experiments can share cached prefixes, which can distort cost comparisons.

> concurrent experiments can share cached prefixes and distort cost comparisons.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source-stated

The authors argue that context-management methods should be evaluated by considering token prices and the agent's subsequent behavior together.

> These results show why context-management methods should be evaluated using both token prices and the agent's subsequent behavior.

- [Supporting source](https://arxiv.org/abs/2611.22238)

## Source and contributor context

Yang, Zerui, Dong, Miaomiao, Xue, Quan, Zhang, Chaorui, Zheng, Xuanyu, Wang, Xiyuan, Ruan, Haolin, Niu, Xueyan, Song, Guangcheng, Zhang, Weixi, Han, Wei, Bai, Bo · Article author

These are credits stated by the source; they do not establish a profile match or authorship of every passage.


## Source media

No suitable media was found by the supported page extraction.


## Terms and references

Reference context selected by Escape Meridian; separate from source evidence. Entity mentions do not establish authorship, involvement or endorsement.


## Large language model

A language model with many learned numerical settings, used to process and generate language.

- [Definition reference](https://developers.google.com/machine-learning/glossary#large-language-model)

## Model tokens

Small chunks of text, often parts of words, that a language model reads and writes; usage and prices are often counted in tokens.

- [Definition reference](https://developers.google.com/machine-learning/glossary#token)

## arXiv

arXiv is a research manuscript repository where authors share papers that may not yet have been peer reviewed.

- [Explore this context](/entities/arxiv)
- [Reference](https://arxiv.org/)
- [Reference](https://info.arxiv.org/help/api/index.html)

## Editorial provenance

Version 1. Publication ID: ee8f74d1-25c7-440e-8d72-f1f3fd2e375d.

Prepared by gpt-6-luna; grounding review by gpt-6-luna.

Source check: uncertain by anthropic/claude-opus-5.5 on 2026-11-18T13:33:44.572Z. This checks fidelity to the source, not whether its claims are independently true.

Editorial selection: accept; reasons: material\_development.

Observation: f33f4c272351f7cdb11dcddb3758c0825200ae37b0d2b0ef582b2ee2ca1abb4e. Source text hash: 55e3e00823ffc5bb7a2704f9608b6e6e92fe36acc38df2882a5199df01018c1f.


### uncertain — 2026-11-18T13:33:44.572Z — anthropic/claude-opus-5.5

Publication: ee8f74d1-25c7-440e-8d72-f1f3fd2e375d

attribution — pass: The draft attributes the paper to Zerui Yang and coauthors on arXiv, which matches the listed authors. It presents the findings as the authors' reported results rather than as established facts.

> Authors:Zerui Yang, Miaomiao Dong, Quan Xue, Chaorui Zhang

summary — uncertain: The figures are faithful, but a general reader is missing the setup that makes them meaningful. The draft omits the abstract's opening framing: coding agents repeatedly resend their conversation history. It also never says that the removed old observations are old tool outputs. Key terms go unexplained or lack tooltips: prefix caching, tokens, cached input, resolution (whether the task was solved), and evidence-package experiments. Without these, it is unclear why removing context could raise cost. Smallest repair: open with the source's framing that agents resend their history, gloss observations as old tool outputs, and add tooltips for prefix caching and the token terms.

> Coding agents repeatedly send their conversation history to a language model. Adding useful code may reduce search, while removing old tool outputs may shorten later prompts.

date — pass: The originalPublished date of 2026-11-17 matches the v1 submission date on arXiv. It is not the later feed date.

> \[Submitted on 17 Nov 2026\]

support — pass: All percentages, benchmarks, run counts and conditions match the abstract. The 'may' hedging on extra steps is preserved. The question addresses a real gap that the limitations acknowledge, and it does not assume an answer.

> shorter prompts do not guarantee cheaper runs because agents may respond by taking more steps.

media — pass: The selected media is the verified arXiv abstract page itself, which is the direct original source.

## Recorded references

Explicit citations in public readings to this reading. Shared topics are not citations. Other record types need an explicit reference adapter.

No public references recorded here yet.

[Reference data (JSON)](/readings/0dc6175a3d491f6b1766e066855633e412bf367af83970d9f6baa94b74652b17/references.json)

## Corrections and challenges

[Send a correction or an opposing source](https://escapemeridian.com/corrections/)

[JSON record](https://escapemeridian.com/readings/arxiv-paper-context-has-a-price-for-llm-coding-agents-under-0dc6175a.json)
