Experiment · agent economics
A week on Claude Code, by the token
I leaned on one Claude Code plan for a whole week and hit its weekly limit twice, using a reset in between. I wanted to know where it went, so I read every transcript on the machine and counted.
Corrected 7 November. The first version treated this as one allowance that ran out 3 hours 19 minutes early, and started the window an hour too soon. In fact I hit the limit on Tuesday too and reset it. Every figure below is recounted.
What I found
- One project took 63%. Graft used $2,808 of the week. The next three together used 33%.
- Agents I launched, not messages I typed, drove the bill. Multi-agent workflow runs took 59%: 166 runs and 2,169 agents.
- Output was the small part. Generated text and thinking cost 23%. The rest was context being stored and read back.
- Caching did most of the saving. The same reads at the full input price would have cost about $34,000 more. Cache hits ran near 97%.
- I spent it unevenly. One day, 31 October, took 26%. By noon on 5 November 90% was gone.
Two allowances, not one
| Allowance | Ran | Days | Cost | Calls | Output | Cache write | Cache read | Then locked out for |
|---|---|---|---|---|---|---|---|---|
| First allowance | Fri 30 Oct 13:00 PDT to Tue 3 Nov 01:05 PST | 3.5 | $2,553 | 31,894 | 25.8M | 151.8M | 6,136M | 5 h 20 min, until my reset |
| Second allowance | Tue 3 Nov 06:25 PST to Fri 6 Nov 08:41 PST | 3.1 | $1,956 | 19,798 | 27.6M | 142.3M | 3,002M | 3 h 19 min, until the weekly reset |
Without the reset the week would have stopped on Tuesday morning at $2,553, with three and a half days left. The reset paid for the other 43%. Even so, neither allowance lasted four days.
The two rows also give a small clue about how the limit counts. Both allowances ended at nearly the same output and cache writes, while cache reads differed by a factor of two and list-price cost by 30%. So the limit may give cache reads little weight. That is two data points and a guess: I cannot see how the plan counts tokens. If it holds, the things to watch are output and fresh context, not long conversations.
Day by day
The numbers
| Day | Workflow agents | My sessions and their subagents | Headless pipeline | Total |
|---|---|---|---|---|
| 30 Oct | $104 | $163 | $0 | $267 |
| 31 Oct | $768 | $426 | $0 | $1,194 |
| 1 Nov | $192 | $122 | $0 | $314 |
| 2 Nov | $579 | $131 | $12 | $722 |
| 3 Nov | $301 | $189 | $70 | $560 |
| 4 Nov | $394 | $127 | $82 | $603 |
| 5 Nov | $317 | $160 | $231 | $708 |
| 6 Nov | $0 | $16 | $123 | $139 |
By project
| Project | Share of cost | Cost | Calls | Output | Cache read | Cost per commit |
|---|---|---|---|---|---|---|
| Graft Keeps a changed copy of an open-source project on upstream's releases. Pre-launch hardening, reviews and new product builds | 62.3% | $2,808 | 35,602 | 27.0M | 6,743M | $2.78 |
| Robocurve Robot benchmark tasks for a contest, built by an unattended pipeline, plus the analysis around it | 22.0% | $994 | 8,380 | 17.4M | 1,132M | $8.42 |
| Duck Studio Native app for the Microduck robot, and its local driving policy | 6.5% | $294 | 3,021 | 3.6M | 465M | $3.46 |
| StreetCase Street-safety evidence portal for Sacramento, built from scratch this week | 4.7% | $210 | 2,488 | 2.5M | 484M | $26.25 |
| Home and admin Work with no project path: email, planning, memory, machine upkeep | 2.9% | $133 | 1,452 | 1.8M | 231M | |
| PlatAtlas Robot fleet and agent operations | 0.9% | $39 | 335 | 0.6M | 35M | |
| Everything else About a dozen small projects | 0.7% | $30 | 414 | 0.4M | 49M |
Commits are a rough yardstick. Graft commits small and often, Robocurve's task work lands in pull requests that this count leaves out, and StreetCase was one large build. None of them measures value. Robocurve has 0 tasks accepted so far, with 11 under review.
By model and by channel
| Model | Cost | Share | Calls | Output | Cache read | Cache write |
|---|---|---|---|---|---|---|
| Claude Opus 5.5 | $4,422 | 98.1% | 50,192 | 51.28M | 9,000M | 284.8M |
| Claude Sonnet 5.5 | $86 | 1.9% | 1,489 | 2.16M | 138M | 9.3M |
| Claude Haiku 5.5 | $0 | 0.0% | 11 | 0.01M | 0.05M | 0.1M |
| Channel | What it is | Cost | Share | Calls | Cost per call | Average context |
|---|---|---|---|---|---|---|
| Workflow agents | Parallel agents from multi-agent runs: 166 runs, 2,169 agents | $2,654 | 58.9% | 35,548 | $0.075 | 133K |
| Main conversation | My own sessions, with 1,718 prompts across all channels | $1,115 | 24.7% | 8,828 | $0.126 | 431K |
| Headless pipeline | Unattended claude -p runs, nearly all Robocurve | $519 | 11.5% | 4,553 | $0.114 | 97K |
| Subagents | Single helpers spawned from a session | $220 | 4.9% | 2,763 | $0.080 | 160K |
A call in my main conversation cost about 1.7 times a call from a workflow agent, because it carried 435,000 tokens of context on average. Workflow agents were cheap one call at a time, and there were a great many of them.
Of the $4,509: cache reads $1,828 (40.5%); cache writes $1,633 (36.2%); output, including thinking $1,047 (23.2%). Uncached input came to under a dollar.
Where the waste was
These overlap, so they do not add up. "Waste" is my judgement. The Evidence column says how firm each number is.
| Item | Size | Evidence | Detail |
|---|---|---|---|
| Robocurve tasks that were never submitted | $300 | Measured | 21 tasks dropped, 60% of the $504 spent inside task folders. Many failed review or a scripted demo after the build was paid for. A pre-build duplicate check went in on 6 November. |
| Workflow agent cold starts | $374 | Measured | Each agent wrote about 34,000 tokens to cache on its first call, 74.8 million in all. Some of that is needed. My memory index alone, 24.8 KB, costs about $110 across the week if every agent loads it (estimate). |
| Very long main conversations | $166 | Estimate | Sessions ran to 967,000 tokens of context. $459 of cache reads happened above 500,000. Compacting at 450,000 would have saved about $166, before the cost and the lost detail of compacting. |
| Opus on the unattended pipeline | $190 | Estimate | Headless runs at Sonnet rates, assuming the same turns and the same quality, which I did not test. The pipeline moved to Sonnet on 6 November. |
| Repeat review rounds | $177 | Measured | Four rounds of one Graft UX sweep. I did not count what each round found, so some of this may be well spent. The question is whether round four paid. |
| Bulk idea generation | $157 | Measured | Four Robocurve runs that produced and judged about 200 ideas. Many never reached a build. |
| Opus on every workflow agent | $870 | Upper bound | The gap to Sonnet rates. My own standing rule puts Opus on every agent. Only a measured comparison would show how much of this is really waste. |
Tool output adds to all of these. Bash returned 189 million characters over 51,949 calls, about 84% of all tool output. It went straight into context and was read back on every call after that. Failure was not the problem: 1,044 tool errors and 81 API errors in a week.
What I would change
- Pace the week. Watch the burn rate. Each allowance lasted about three and a half days at this rate. The second ran out on a morning when a contest pipeline needed it.
- Stop review rounds on evidence. Run another round only if the last one found something real.
- Test Sonnet on the mechanical agent stages. Run the same work both ways and compare findings per dollar, before changing my Opus rule.
- Shrink what every agent loads. A small file read by 2,169 agents is not small.
- Compact earlier in long sessions. Try around 450,000 tokens and see whether I lose anything I miss.
- Put cheap gates before expensive builds. Dropped Robocurve tasks were the plainest loss, and that is where the duplicate check now sits.
Method and limits
- Source. Claude Code's local JSONL transcripts on one machine, including every subagent file: 2,914 files, deduplicated by message and request ID. Other machines, the web app and cloud routines are not counted. This is a one-week audit with no control and no prediction written first, so it describes the week and proves nothing about what caused what.
- Window. One weekly cycle. The reset is Friday 20:00 UTC, which read 1 pm before the clocks changed on 1 November and 12 pm after. The limit messages show when it was hit. The transcripts do not record my Tuesday reset, so I date it from the first call that worked afterwards, 06:25 PT. Another $197 of use came after the weekly reset and is left out.
- Dollars. A yardstick, not a bill. I priced tokens at list rates per million: Opus 5.5 $4 in, $20 out, $0.20 cache read; Sonnet 5.5 $2, $10, $0.20; Haiku 5.5 $0.10, $0.50; cache writes at 1.25 times input for 5 minutes and 2 times for 1 hour. My plan is a flat fee, and I cannot see how it weighs tokens toward its limit.
- Projects. Attributed per turn and per agent from the file paths each one touched, with the prompt as a fallback. The long sessions crossed projects, so a split like this is approximate. $104 was inherited from the turn before.
- Output. Includes thinking, which transcripts do not separate.
- Prompts. None are published here, only counts.