The subscription that runs the agents has a weekly quota, and when it runs out the work stops. So the question is not which tokens are expensive in principle. It is which ones this company actually spends, counted correctly.
We measure what an agent re-reads, and decide what it needs to keep. Context is the instructions, conversation and files supplied to an agent. Tokens are units of text.
In the Claude Code transcripts retained on the founder's machine, counted once per model call, the main sessions re-read 421 tokens of cached context for every token they wrote. Counted the old way, once per transcript line, the same files give 333. That measures reread volume. It does not measure cost or quota use.
What is context engineering?
Deciding which instructions, conversation and files an agent receives on each call. A file can be supplied again on later calls while it remains in context. Compaction can summarize it, and removal can take it out.
Cumulative input load is the sum of the context supplied across calls. Context size times call count describes it only when that size stays constant. Cost also depends on output, model choice and how each input is counted.
What can this page not see?
Every current figure here was measured on from transcripts on one machine. The limits come first:
- The first measurement, on , cannot be recounted: most of the transcripts it read are no longer on the machine. Its figures are dated facts. NOT OBSERVED.
- One machine, one project directory, one tool. The transcripts are local and never committed, so a reader cannot rerun this on our data. They can rerun the method on theirs.
- Apart from the week of , the retained record starts in late August 2026 because older transcripts were removed from the machine. What removed them, and on what rule, is NOT OBSERVED.
- Cache reads are billed read events, not distinct tokens. The ratio compares token volumes. It measures neither distinct information nor the share of quota consumed.
- No causal claim. Nothing here has a controlled comparison.
- Codex sessions are not in this count. Work handed to Codex leaves this context, and its own context cost is NOT OBSERVED here.
- This is not a cost-weighted figure. A cost-weighted view of an earlier window, with each kind of token priced, is The Cache-Read Tax.
What did the corrected count show?
That the old count hid part of the tax. Claude Code writes a transcript one line per content block and puts the whole call's usage on every one of those lines. A main-loop call averages 2.06 lines, so counting lines counts most calls more than once.
On every reader in the repository moved to counting each API call once.
Rerun with that counter on , the main session loop wrote 70.7 million output tokens and re-read 29.8 billion tokens of cache across 82,726 calls in 421 sessions. That is 421 reads for every token written. Counting the same files once per line gives 333.
The likely reason is that a call with more content blocks writes more output, so counting lines gave the most weight to the calls that write the most. That reading fits both ratios; it was not measured on its own.
Sub-agents run separate contexts and are counted apart: 129,622 calls. With them in, the ratio is 447.
Tokens read back from cache for every token written, by how they are counted
Counted once per API call, the main loop re-read 420.9 cached tokens per output token, up from 332.9 under the old per-line count; with sub-agents counted in, the ratio is 447.2.
Cache-read tokens per output token
- Every row is a snapshot. The transcripts stay on the founder's machine and are never committed, so the rows change only when the file is rebuilt there, and no remote run can refresh them.
- The per-line row is the old counting rule. It counted a call once for every transcript line the call wrote, which every reader in the repository stopped doing in September; it is drawn to show the correction, never as a current figure.
- The ratio compares token volumes. It is not a cost, and it is not a share of the weekly quota.
Not shown. Codex sessions, which run outside these transcripts. The July week is not shown as a week; its 24 main-loop calls are in the three totals.
Built from context-figures.generated.json, written by scripts/research/method-figures/context-engineering.ts from the founder's local Claude Code transcripts. Every row is a snapshot of the founder's machine, rebuilt only there.
Snapshot of
The numbers as a table
| What is counted | Cache read per output token | Where it was counted |
|---|---|---|
| Main loop, per transcript line (the old counting rule) | 332.9 | Local transcripts, a snapshot |
| Main loop, each API call counted once | 420.9 | Local transcripts, a snapshot |
| All calls with sub-agents, each counted once | 447.2 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 413.9 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 309.3 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 368.3 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 465.3 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 342.3 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 490.5 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 500.2 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 565.5 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 536.7 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 526.0 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 406.1 | Local transcripts, a snapshot |
| Main loop, each API call counted once, week of | 445.5 | Local transcripts, a snapshot |
Download the data: context-engineering-ratio-dots.csv, context-engineering-ratio-dots.json
The figures are a snapshot of ; the page was last updated . The file that holds them is rebuilt only on the founder's machine, so only the snapshot date marks a recount; the page's own date moves when its words change.
What happened to the July measurement?
The first measurement, on , counted lines. It reported cache reads at 285 times output over 35 sessions, an average of 504,141 tokens re-read per turn, and three sessions over 6,000 turns carrying 60 percent of all consumption.
Most of those transcripts are no longer on the machine, so the July figure cannot be recounted. What can be said: on the record we can still read, the method it used understates the ratio.
Two things look different now. A main-loop call re-reads 359,699 tokens on average. In the retained record the three largest sessions carry 12 percent of main-loop cache reads.
Neither is a trend. The July figures used a different counter and a smaller set: its turn counts were per line, inflated 1.8 to 2.4 times by the repository's own correction, and its share was of all consumption, not of main-loop cache reads.
Is the ratio getting better week by week?
No clear trend, and not flat either. By week the main loop's ratio ran 309 to 491 in late August through September, 500 to 566 in October, 406 to 446 in November so far. The average re-read per call stayed between about 286,000 and 437,000 tokens.
A trend claim needs more weeks and a stated cause. Neither is in hand.
Average tokens re-read per main loop call, by week
- : 422,791
- : 380,778
- : 306,177
- : 370,259
- : 286,467
- : 416,304
- : 389,876
- : 436,867
- : 384,508
- : 391,810
- : 320,741
- : 333,026
The numbers as a table
| Week of | Tokens re-read per call |
|---|---|
| 422,791 | |
| 380,778 | |
| 306,177 | |
| 370,259 | |
| 286,467 | |
| 416,304 | |
| 389,876 | |
| 436,867 | |
| 384,508 | |
| 391,810 | |
| 320,741 | |
| 333,026 |
Download the data: context-engineering-weekly-reread.csv, context-engineering-weekly-reread.json
How does an agent remember across sessions?
Through files that a fresh session can read. Compaction can shorten the conversation during a session, so a detail that must survive belongs in the repository too.
- A handoff file tells the next session what is done, what is open and what is the founder's to decide. The rule is to commit it with the work it describes; some handoffs stay in a local folder that is not committed.
- A goal that spans many sessions keeps its state in a ledger file with an append-only block per iteration, never in context.
- The standing instructions load on every turn, so their length is a recurring cost. Rules that apply to one area live in a file that loads only when the work is in that area.
- A memory index on the founder's machine, never committed, points to notes kept beside it and loads into a session in this project when it starts.
The handoff loop turns that into a process boundary. Each iteration is a fresh process with a cap of 48 turns, told to hand off before it reaches the cap. Clearing an interactive session is still the founder's job, one of the places he stays in the loop.
A handoff is written by the agent that is about to lose its context. What it leaves out, the next session cannot know it is missing.
What does prompt caching change?
It makes the re-read affordable, and it makes it easy to stop seeing. The re-read this page counts is the part of each call served from the prompt cache, which is why a call can re-read about 360,000 tokens and still look routine.
Cached text can be read again while it remains in the supplied context. Compaction or removal changes what later calls receive. This record does not measure the savings from either.
This page counts cache reads. It does not price them, and it does not measure how often the cache missed.
What rules follow from it?
Five, the first the largest single controllable cost the July measurement found.
- Never read an image in the main session. Send it to a sub-agent, which looks at it in its own context and returns a description.
- Batch independent tool calls into one turn. Four sequential searches at 500,000 tokens of context cost 2 million in reads. The same four in one turn cost 500,000.
- Never re-read a file already in context, and prefer a targeted search to a full read. A long file can add input to later calls while it remains in context.
- Give heavy reading a separate session when a short answer can return to the main one. Whether that saves tokens depends on both sessions and their calls. Handing a unit of work to another model, as in cross-model review, has not been measured as a saving in this population.
- Say when to clear. Only the founder can clear a session, so the agent says plainly when a new task is unrelated to what is already loaded.
The image rule rests on the July measurement: 76 image reads averaging about 123,660 tokens each, 47 percent of all tool result volume, each then re-read on every later turn. Whether the per-line count changed the 123,660 figure is not verified; most of those transcripts are no longer on the machine.
How is a token budget watched?
Two signals, both silent under budget. A hook runs on every prompt and speaks only when the week is projected past 85 percent of the measured ceiling by default. The pre-commit hook warns when the active session passes 150,000 tokens of context per call by default. A signal that fires every time gets ignored.
The unattended loop has a hard stop as well: a weekly budget the founder sets, judged before each iteration from the loop's own run files. A budget file that does not validate stops the loop rather than letting it run unmetered.
Usage is never reported in dollars. On a flat subscription the marginal cost is zero and the limit is the weekly quota. A dollar figure invents a currency nobody is spending.
The prompt hook lives in a settings file that is not committed, so it does not survive a fresh clone. A grading command reports when it is missing rather than assuming it is there.
Where does context engineering fail?
The rules are prose an agent has to follow, and the hooks only warn. A rule the agent must remember is weaker than a check that refuses, which is the whole argument of harness engineering.
And the measurement sees one machine. Every figure here comes from transcripts that live on the founder's computer and are never committed, so nobody outside can recount them.
Context engineering questions? Answers.
Related reading
- Harness engineering
How agent mistakes become standing instructions, tests, checks and gates.
- The Cache-Read Tax
A cost-weighted view of an earlier window, with each kind of token priced.
- Human in the loop
Where the founder's time goes, and the recorded commands that replace hand edits.
- All Orbyt Labs methods
Every method page, each with its dated public record.
Cite this page
Cite this page for the practice and follow its sources for the underlying records.
Bartak, J. (2026). Context Engineering. Orbyt Labs Research. https://