Upload 2 files
Browse files- README.md +78 -0
- runs_ucurve.csv +37 -0
README.md
CHANGED
|
@@ -1,3 +1,81 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pretty_name: "Context U-curve: 36 coding-agent runs under six context-clearing policies"
|
| 6 |
+
size_categories:
|
| 7 |
+
- n<1K
|
| 8 |
+
tags:
|
| 9 |
+
- llm-agents
|
| 10 |
+
- coding-agents
|
| 11 |
+
- context-window
|
| 12 |
+
- prompt-caching
|
| 13 |
+
- token-usage
|
| 14 |
+
- claude-code
|
| 15 |
+
- benchmark
|
| 16 |
+
configs:
|
| 17 |
+
- config_name: default
|
| 18 |
+
data_files: runs_ucurve.csv
|
| 19 |
---
|
| 20 |
+
|
| 21 |
+
# Context U-curve: 36 coding-agent runs under six context-clearing policies
|
| 22 |
+
|
| 23 |
+
How often should an LLM coding agent's context be cleared? This dataset holds every run behind the report
|
| 24 |
+
**"Clear Every Third Task: A Measured U-Curve in the Context Economy of Coding Agents"**
|
| 25 |
+
(Evgenii Arsentev, 2026, DOI [10.5281/zenodo.22699668](https://doi.org/10.5281/zenodo.22699668)).
|
| 26 |
+
|
| 27 |
+
A fixed suite of twelve programming tasks was run under six session-length policies — a fresh session every
|
| 28 |
+
1, 2, 3, 4, 6 and 12 tasks — with six replicates each, holding the model, the tasks, their order and the
|
| 29 |
+
verification suite constant. 36 runs, 4086 tests, 0 failures.
|
| 30 |
+
|
| 31 |
+
## Summary by policy
|
| 32 |
+
|
| 33 |
+
| tasks per session | runs | mean modeled cost, USD | mean cache writes | mean cache reads | tests passed |
|
| 34 |
+
|---|---|---|---|---|---|
|
| 35 |
+
| 1 | 6 | 2.68 | 253k | 3.62M | 701/701 |
|
| 36 |
+
| 2 | 6 | 2.40 | 170k | 3.58M | 697/697 |
|
| 37 |
+
| 3 | 6 | 2.14 | 131k | 3.16M | 687/687 |
|
| 38 |
+
| 4 | 6 | 2.28 | 123k | 3.47M | 699/699 |
|
| 39 |
+
| 6 | 6 | 2.28 | 106k | 3.80M | 661/661 |
|
| 40 |
+
| 12 | 6 | 2.47 | 88k | 4.45M | 641/641 |
|
| 41 |
+
|
| 42 |
+
Cost is not monotone in session length: clearing after every task and never clearing are both more expensive
|
| 43 |
+
than clearing every three to six tasks. Cache writes fall with longer sessions while context carried per call
|
| 44 |
+
rises; their product, cache reads, is U-shaped. Full statistics (exact permutation tests) are in the report.
|
| 45 |
+
|
| 46 |
+
## Fields
|
| 47 |
+
|
| 48 |
+
One row per run. Counters only — no prompts, no model output, no file paths, no project names.
|
| 49 |
+
|
| 50 |
+
| field | meaning |
|
| 51 |
+
|---|---|
|
| 52 |
+
| run_id | hash of the run directory name |
|
| 53 |
+
| tasks_per_session | policy: a fresh session every N tasks (12 = never cleared) |
|
| 54 |
+
| replicate | replicate number 1–6 |
|
| 55 |
+
| sessions | sessions the run used |
|
| 56 |
+
| model_calls | API calls made by the agent |
|
| 57 |
+
| input_tokens / output_tokens | uncached input and model output tokens |
|
| 58 |
+
| cache_write_tokens / cache_read_tokens | prompt-cache writes and reads |
|
| 59 |
+
| total_tokens | sum of the four token counters |
|
| 60 |
+
| modeled_cost_usd | cost at the model's public list prices |
|
| 61 |
+
| wall_clock_s | wall-clock duration of the run |
|
| 62 |
+
| tests_total / tests_passed / tests_failed | verification suite result after the run |
|
| 63 |
+
|
| 64 |
+
## Tooling
|
| 65 |
+
|
| 66 |
+
The run-efficiency metric from this study is implemented in [contextburn](https://github.com/arsentev-ai/contextburn)
|
| 67 |
+
(`pip install contextburn`, MCP server `ai.arsentev/contextburn`).
|
| 68 |
+
|
| 69 |
+
## Citation
|
| 70 |
+
|
| 71 |
+
```bibtex
|
| 72 |
+
@techreport{arsentev2026ucurve,
|
| 73 |
+
author = {Arsentev, Evgenii},
|
| 74 |
+
title = {Clear Every Third Task: A Measured U-Curve in the Context Economy of Coding Agents},
|
| 75 |
+
year = {2026},
|
| 76 |
+
institution = {ARSENTEV.AI},
|
| 77 |
+
doi = {10.5281/zenodo.22699668}
|
| 78 |
+
}
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
Author: Evgenii Arsentev · ORCID [0000-0002-9120-7298](https://orcid.org/0000-0002-9120-7298) · [arsentev.ai/research](https://arsentev.ai/research)
|
runs_ucurve.csv
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
run_id,tasks_per_session,replicate,sessions,model_calls,input_tokens,output_tokens,cache_write_tokens,cache_read_tokens,total_tokens,modeled_cost_usd,wall_clock_s,tests_total,tests_passed,tests_failed
|
| 2 |
+
7ad4265d916f,1,1,12,95,190,41780,257116,3667239,3966325,2.6916,451,123,123,0
|
| 3 |
+
991ba46d5fe5,1,2,12,107,214,46437,265077,4301299,4613027,2.9816,667,117,117,0
|
| 4 |
+
b0ce6d78d965,1,3,12,95,190,51081,257084,3639806,3948161,2.8228,535,106,106,0
|
| 5 |
+
21bac64764c8,1,4,12,84,168,38563,245800,3155912,3440443,2.4475,466,114,114,0
|
| 6 |
+
c73de3aaae83,1,5,12,95,190,43101,249790,3644349,3937430,2.6771,465,122,122,0
|
| 7 |
+
7a919fd81c75,1,6,12,88,176,37255,240332,3328167,3605930,2.459,456,119,119,0
|
| 8 |
+
e95d7e6ab391,2,1,6,82,164,50436,171869,3490496,3712965,2.4487,519,117,117,0
|
| 9 |
+
efd7a83830d8,2,2,6,77,154,44530,164418,3211843,3420945,2.2485,522,105,105,0
|
| 10 |
+
17073b28a3db,2,3,6,85,170,48174,167413,3605145,3820902,2.4325,505,127,127,0
|
| 11 |
+
af42a745f337,2,4,6,95,190,43781,174534,4065676,4284181,2.5315,520,113,113,0
|
| 12 |
+
405173d7186b,2,5,6,79,158,39566,168367,3344213,3552304,2.2286,486,121,121,0
|
| 13 |
+
e38e518f05e9,2,6,6,88,176,49037,171421,3754937,3975571,2.5054,690,114,114,0
|
| 14 |
+
d5030af99b40,3,1,4,68,136,41539,128528,3043374,3213577,2.0185,409,120,120,0
|
| 15 |
+
3f1c0b6481b1,3,2,4,76,152,47084,136130,3410891,3594257,2.2405,469,111,111,0
|
| 16 |
+
a6280851367c,3,3,4,69,138,49047,131926,3003390,3184501,2.1319,521,114,114,0
|
| 17 |
+
20eeb24f2fad,3,4,4,76,152,51955,134441,3346568,3533116,2.2879,522,113,113,0
|
| 18 |
+
b70e95496c7c,3,5,4,72,144,44515,129576,3203916,3378151,2.1152,512,122,122,0
|
| 19 |
+
35ed101ee28b,3,6,4,68,136,45155,126002,2954962,3126255,2.0367,462,107,107,0
|
| 20 |
+
04fb08b01d56,4,1,3,69,138,52604,122286,3375927,3550955,2.2608,514,110,110,0
|
| 21 |
+
a314a80b451d,4,2,3,66,132,47818,118045,3143415,3309410,2.1034,458,122,122,0
|
| 22 |
+
c75ba3c5a591,4,3,3,74,148,53960,132063,3708824,3894995,2.4177,637,115,115,0
|
| 23 |
+
ba3fc35a6d31,4,4,3,74,148,57404,129621,3674635,3861808,2.45,570,112,112,0
|
| 24 |
+
0fc5b487c216,4,5,3,73,146,53214,124269,3583088,3760717,2.3396,520,124,124,0
|
| 25 |
+
3e0ef41dcb9d,4,6,3,70,140,45034,114584,3314962,3474720,2.1001,458,116,116,0
|
| 26 |
+
fe6dbd0555ed,6,1,2,66,132,46805,97438,3310994,3455369,2.0612,490,109,109,0
|
| 27 |
+
9ad717907bf6,6,2,2,63,126,46802,99882,3225309,3372119,2.0446,487,115,115,0
|
| 28 |
+
48dd7bcb4a33,6,3,2,77,154,52880,110047,4245681,4408762,2.48,630,100,100,0
|
| 29 |
+
bfc047f10a8c,6,4,2,70,140,50159,103416,3691313,3845028,2.248,504,113,113,0
|
| 30 |
+
84e41e3aa677,6,5,2,72,144,46412,103820,3840881,3991257,2.2382,452,106,106,0
|
| 31 |
+
b8d8da6086f3,6,6,2,78,156,54813,119872,4467254,4642095,2.6124,582,118,118,0
|
| 32 |
+
0be049a6acbd,12,1,1,60,120,49072,82563,4097568,4229323,2.2753,473,107,107,0
|
| 33 |
+
2e82091b7a73,12,2,1,63,126,55255,89944,4506184,4651509,2.5183,527,115,115,0
|
| 34 |
+
3b9e1f50905b,12,3,1,75,150,52646,89065,5167386,5309247,2.6743,501,105,105,0
|
| 35 |
+
c6f35f1bafb5,12,4,1,58,116,49307,80117,3886467,4016007,2.2063,526,97,97,0
|
| 36 |
+
df5656c84d8b,12,5,1,63,126,53033,86489,4510093,4649741,2.4732,581,114,114,0
|
| 37 |
+
dd698a8f51e6,12,6,1,59,118,63705,98898,4540502,4703223,2.6889,650,103,103,0
|