run_id stringlengths 12 12 | tasks_per_session int64 1 12 | replicate int64 1 6 | sessions int64 1 12 | model_calls int64 58 107 | input_tokens int64 116 214 | output_tokens int64 37.3k 63.7k | cache_write_tokens int64 80.1k 265k | cache_read_tokens int64 2.95M 5.17M | total_tokens int64 3.13M 5.31M | modeled_cost_usd float64 2.02 2.98 | wall_clock_s int64 409 690 | tests_total int64 97 127 | tests_passed int64 97 127 | tests_failed int64 0 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7ad4265d916f | 1 | 1 | 12 | 95 | 190 | 41,780 | 257,116 | 3,667,239 | 3,966,325 | 2.6916 | 451 | 123 | 123 | 0 |
991ba46d5fe5 | 1 | 2 | 12 | 107 | 214 | 46,437 | 265,077 | 4,301,299 | 4,613,027 | 2.9816 | 667 | 117 | 117 | 0 |
b0ce6d78d965 | 1 | 3 | 12 | 95 | 190 | 51,081 | 257,084 | 3,639,806 | 3,948,161 | 2.8228 | 535 | 106 | 106 | 0 |
21bac64764c8 | 1 | 4 | 12 | 84 | 168 | 38,563 | 245,800 | 3,155,912 | 3,440,443 | 2.4475 | 466 | 114 | 114 | 0 |
c73de3aaae83 | 1 | 5 | 12 | 95 | 190 | 43,101 | 249,790 | 3,644,349 | 3,937,430 | 2.6771 | 465 | 122 | 122 | 0 |
7a919fd81c75 | 1 | 6 | 12 | 88 | 176 | 37,255 | 240,332 | 3,328,167 | 3,605,930 | 2.459 | 456 | 119 | 119 | 0 |
e95d7e6ab391 | 2 | 1 | 6 | 82 | 164 | 50,436 | 171,869 | 3,490,496 | 3,712,965 | 2.4487 | 519 | 117 | 117 | 0 |
efd7a83830d8 | 2 | 2 | 6 | 77 | 154 | 44,530 | 164,418 | 3,211,843 | 3,420,945 | 2.2485 | 522 | 105 | 105 | 0 |
17073b28a3db | 2 | 3 | 6 | 85 | 170 | 48,174 | 167,413 | 3,605,145 | 3,820,902 | 2.4325 | 505 | 127 | 127 | 0 |
af42a745f337 | 2 | 4 | 6 | 95 | 190 | 43,781 | 174,534 | 4,065,676 | 4,284,181 | 2.5315 | 520 | 113 | 113 | 0 |
405173d7186b | 2 | 5 | 6 | 79 | 158 | 39,566 | 168,367 | 3,344,213 | 3,552,304 | 2.2286 | 486 | 121 | 121 | 0 |
e38e518f05e9 | 2 | 6 | 6 | 88 | 176 | 49,037 | 171,421 | 3,754,937 | 3,975,571 | 2.5054 | 690 | 114 | 114 | 0 |
d5030af99b40 | 3 | 1 | 4 | 68 | 136 | 41,539 | 128,528 | 3,043,374 | 3,213,577 | 2.0185 | 409 | 120 | 120 | 0 |
3f1c0b6481b1 | 3 | 2 | 4 | 76 | 152 | 47,084 | 136,130 | 3,410,891 | 3,594,257 | 2.2405 | 469 | 111 | 111 | 0 |
a6280851367c | 3 | 3 | 4 | 69 | 138 | 49,047 | 131,926 | 3,003,390 | 3,184,501 | 2.1319 | 521 | 114 | 114 | 0 |
20eeb24f2fad | 3 | 4 | 4 | 76 | 152 | 51,955 | 134,441 | 3,346,568 | 3,533,116 | 2.2879 | 522 | 113 | 113 | 0 |
b70e95496c7c | 3 | 5 | 4 | 72 | 144 | 44,515 | 129,576 | 3,203,916 | 3,378,151 | 2.1152 | 512 | 122 | 122 | 0 |
35ed101ee28b | 3 | 6 | 4 | 68 | 136 | 45,155 | 126,002 | 2,954,962 | 3,126,255 | 2.0367 | 462 | 107 | 107 | 0 |
04fb08b01d56 | 4 | 1 | 3 | 69 | 138 | 52,604 | 122,286 | 3,375,927 | 3,550,955 | 2.2608 | 514 | 110 | 110 | 0 |
a314a80b451d | 4 | 2 | 3 | 66 | 132 | 47,818 | 118,045 | 3,143,415 | 3,309,410 | 2.1034 | 458 | 122 | 122 | 0 |
c75ba3c5a591 | 4 | 3 | 3 | 74 | 148 | 53,960 | 132,063 | 3,708,824 | 3,894,995 | 2.4177 | 637 | 115 | 115 | 0 |
ba3fc35a6d31 | 4 | 4 | 3 | 74 | 148 | 57,404 | 129,621 | 3,674,635 | 3,861,808 | 2.45 | 570 | 112 | 112 | 0 |
0fc5b487c216 | 4 | 5 | 3 | 73 | 146 | 53,214 | 124,269 | 3,583,088 | 3,760,717 | 2.3396 | 520 | 124 | 124 | 0 |
3e0ef41dcb9d | 4 | 6 | 3 | 70 | 140 | 45,034 | 114,584 | 3,314,962 | 3,474,720 | 2.1001 | 458 | 116 | 116 | 0 |
fe6dbd0555ed | 6 | 1 | 2 | 66 | 132 | 46,805 | 97,438 | 3,310,994 | 3,455,369 | 2.0612 | 490 | 109 | 109 | 0 |
9ad717907bf6 | 6 | 2 | 2 | 63 | 126 | 46,802 | 99,882 | 3,225,309 | 3,372,119 | 2.0446 | 487 | 115 | 115 | 0 |
48dd7bcb4a33 | 6 | 3 | 2 | 77 | 154 | 52,880 | 110,047 | 4,245,681 | 4,408,762 | 2.48 | 630 | 100 | 100 | 0 |
bfc047f10a8c | 6 | 4 | 2 | 70 | 140 | 50,159 | 103,416 | 3,691,313 | 3,845,028 | 2.248 | 504 | 113 | 113 | 0 |
84e41e3aa677 | 6 | 5 | 2 | 72 | 144 | 46,412 | 103,820 | 3,840,881 | 3,991,257 | 2.2382 | 452 | 106 | 106 | 0 |
b8d8da6086f3 | 6 | 6 | 2 | 78 | 156 | 54,813 | 119,872 | 4,467,254 | 4,642,095 | 2.6124 | 582 | 118 | 118 | 0 |
0be049a6acbd | 12 | 1 | 1 | 60 | 120 | 49,072 | 82,563 | 4,097,568 | 4,229,323 | 2.2753 | 473 | 107 | 107 | 0 |
2e82091b7a73 | 12 | 2 | 1 | 63 | 126 | 55,255 | 89,944 | 4,506,184 | 4,651,509 | 2.5183 | 527 | 115 | 115 | 0 |
3b9e1f50905b | 12 | 3 | 1 | 75 | 150 | 52,646 | 89,065 | 5,167,386 | 5,309,247 | 2.6743 | 501 | 105 | 105 | 0 |
c6f35f1bafb5 | 12 | 4 | 1 | 58 | 116 | 49,307 | 80,117 | 3,886,467 | 4,016,007 | 2.2063 | 526 | 97 | 97 | 0 |
df5656c84d8b | 12 | 5 | 1 | 63 | 126 | 53,033 | 86,489 | 4,510,093 | 4,649,741 | 2.4732 | 581 | 114 | 114 | 0 |
dd698a8f51e6 | 12 | 6 | 1 | 59 | 118 | 63,705 | 98,898 | 4,540,502 | 4,703,223 | 2.6889 | 650 | 103 | 103 | 0 |
Context U-curve: 36 coding-agent runs under six context-clearing policies
How often should an LLM coding agent's context be cleared? This dataset holds every run behind the report "Clear Every Third Task: A Measured U-Curve in the Context Economy of Coding Agents" (Evgenii Arsentev, 2026, DOI 10.5281/zenodo.22699668).
A fixed suite of twelve programming tasks was run under six session-length policies — a fresh session every 1, 2, 3, 4, 6 and 12 tasks — with six replicates each, holding the model, the tasks, their order and the verification suite constant. 36 runs, 4086 tests, 0 failures.
Summary by policy
| tasks per session | runs | mean modeled cost, USD | mean cache writes | mean cache reads | tests passed |
|---|---|---|---|---|---|
| 1 | 6 | 2.68 | 253k | 3.62M | 701/701 |
| 2 | 6 | 2.40 | 170k | 3.58M | 697/697 |
| 3 | 6 | 2.14 | 131k | 3.16M | 687/687 |
| 4 | 6 | 2.28 | 123k | 3.47M | 699/699 |
| 6 | 6 | 2.28 | 106k | 3.80M | 661/661 |
| 12 | 6 | 2.47 | 88k | 4.45M | 641/641 |
Cost is not monotone in session length: clearing after every task and never clearing are both more expensive than clearing every three to six tasks. Cache writes fall with longer sessions while context carried per call rises; their product, cache reads, is U-shaped. Full statistics (exact permutation tests) are in the report.
Fields
One row per run. Counters only — no prompts, no model output, no file paths, no project names.
| field | meaning |
|---|---|
| run_id | hash of the run directory name |
| tasks_per_session | policy: a fresh session every N tasks (12 = never cleared) |
| replicate | replicate number 1–6 |
| sessions | sessions the run used |
| model_calls | API calls made by the agent |
| input_tokens / output_tokens | uncached input and model output tokens |
| cache_write_tokens / cache_read_tokens | prompt-cache writes and reads |
| total_tokens | sum of the four token counters |
| modeled_cost_usd | cost at the model's public list prices |
| wall_clock_s | wall-clock duration of the run |
| tests_total / tests_passed / tests_failed | verification suite result after the run |
Tooling
The run-efficiency metric from this study is implemented in contextburn
(pip install contextburn, MCP server ai.arsentev/contextburn).
Citation
@techreport{arsentev2026ucurve,
author = {Arsentev, Evgenii},
title = {Clear Every Third Task: A Measured U-Curve in the Context Economy of Coding Agents},
year = {2026},
institution = {ARSENTEV.AI},
doi = {10.5281/zenodo.22699668}
}
Author: Evgenii Arsentev · ORCID 0000-0002-9120-7298 · arsentev.ai/research
Mirrors and related records
Kaggle copy of this dataset: https://www.kaggle.com/datasets/arsentevai/context-u-curve-of-coding-agents-36-runs
OSF project with the report PDF and the data: https://osf.io/5qtwy/ (DOI 10.17605/OSF.IO/5QTWY)
Demo of contextburn over these runs: DOI 10.5281/zenodo.22713920, https://www.youtube.com/watch?v=ep7LXFernwQ, https://archive.org/details/contextburn-demo-context-ucurve-2026
Podcast episode about this measurement: https://arsentev.ai/podcast/when-to-clear-agent-context
All reports, datasets and DOIs: https://arsentev.ai/research
- Downloads last month
- -