Cost
What a cycle costs, where the tokens go, and which rules move the bill. Every figure on this page
is read from real Claude Code transcripts with npm run tokens, and priced at the API list price
(September 2026). On a subscription you do not pay these amounts, but they are how much of your
usage allowance a cycle consumes.
What costs is how long the context lives
Everything that enters a conversation is paid again on every turn after it. A screenshot read at turn 10 is re-read at turns 11, 12 and 13, all the way to the end. The prompts are not the problem: an agent starts at ~7k. A conversation that lives long is.
Two token kinds make almost the whole bill:
| Share of the $ in a real cycle | What drives it | |
|---|---|---|
| Cache reads | ~50 % | how many turns × how big the context is |
| Cache writes | ~40 % | each new context, and everything added to it |
| Output | < 10 % | what the agents actually write |
The model matters less than you would think. Opus 5.5 and Sonnet 5 read the cache at the same price, $0.20 per million tokens. The lever is the size and the lifetime of each context.
What a cycle costs
| Tokens read | Cost | |
|---|---|---|
| Sketch, real project: Obsolet Graphic Generator, stack 4.1+ | 18.6M | $7.26 |
| Standard, real project: portfolio, install older than 4.1 | 52.7M | $22.25 |
| Standard + code, real project: CTA button, stack 4.3 — 24 tasks, Figma, 13 components | 85.7M | $64 |
| Floor: Sketch on a fresh install (4.1.x validation) | 2.1M | $1.41 |
The floor is a lab figure: a new project, nothing to read. A real project carries its memory, its references and its existing code, and costs 5 to 25 times more. Budget on the real rows.
The CTA row is the first Standard cycle measured on a 4.3 install, code included. It excludes the exploration chat held before the stack was installed ($7). Costs are API list prices computed from the transcripts.
What the guardrails held on a full cycle
CTA button, Sept. 29 — 15 sessions, 12 builds, one designer.
| Guardrail | Target | Measured |
|---|---|---|
| Builder on Sonnet, one fresh run per lot | < 50 turns | 12 runs, max 45 turns, $12.60 in all |
| One phase, one conversation | < 150k | 12 of 15 sessions at 7–30 turns, 100–155k |
| Stack’s own weight in every turn | — | ~3k tokens (CLAUDE.md, STACK.md, agent and skill descriptions) |
Two leaks, both fixed in the stack since:
| Leak | What the transcript shows | Fix |
|---|---|---|
| Figma built in the conductor’s session | 99 turns, 65 figma_execute, 228k — 16 % of the cycle | Figma runs in its own fresh session |
| Thermostat only on your prompts | an autonomous run crossed 150k at turn 40, ran 60 more turns unwarned | the thermostat also fires after tools, once per 25k |
The rest of the bill is not the stack: every turn re-read ~71k of tools and plugins loaded in the environment (MCP servers, skills). Turning off the connectors a project does not use is the next lever — outside the stack’s reach.
Same project, before and after
Obsolet Graphic Generator was built once in a single chat, then reworked with the stack.
| One long chat (Sept. 14) | With the stack (Sept. 28) | |
|---|---|---|
| Tokens read | 59.8M | 18.6M (−69 %) |
| Cost | $17.05 | $7.26 (−57 %) |
| Main conversation | 238 turns · up to 365k of context | 58 turns · up to 158k |
| Images read | 47 | 1 |
Not the exact same work: the chat built the tool, the stack session reworked it. But the stack session ran its main conversation on Opus, where the chat ran on Sonnet, and still cost less than half. The context stayed small.
The levers
Each rule attacks the lifetime or the size of a context.
| Lever | What it does | Where it lives |
|---|---|---|
| One phase, one conversation | each gate writes state_<feature>.md; /pds reprendre starts the next phase fresh | the conductor |
| Relay, never fork | a long session is cut by the state file; a fork carries its whole history | the conductor |
| Context thermostat | a hook measures every prompt and, past 150k, every tool call: at 120k, finish the step; at 150k, relay first | .claude/settings.json (ADR-018) |
| One lot, one fresh builder | RAY cuts the spec into lots of ~50 turns; each lot gets a new bob-build | the spec |
| The builder reads no images | a guard blocks bob-build from reading a screenshot; it verifies in text | .claude/settings.json |
| Effort where the judgment is | the direction on Opus at high effort, the build on Sonnet at medium | agent frontmatter |
| Short by default | the result, the file path, the decision you owe; the detail stays in the file | output: short |
What happens without them
The portfolio ran a Standard cycle on an install older than 4.1: no builder guard, no model pinned
for bob-build, no thermostat. Every missing rule shows in the transcript:
| Missing | What the transcript shows |
|---|---|
No model pinned for bob-build | 3 builds on Opus, $9.16 |
| No image guard | 23 screenshots read by the builders |
| No turn budget per lot | one build at 81 turns and 269k of context |
| No thermostat | the main conversation at 243k, held open for two days |
Measure yours
npm run tokens -- --last 5It reads the project’s transcripts in ~/.claude/projects/ and prints, per session and per agent,
the tokens read, the turns, and the largest context. A ⚠ flags anything past the ADR-014
targets:
| Target | Threshold |
|---|---|
| Context of any conversation | < 150k |
bob-build turns per lot | < 50 |
The history of every measured run, with its context, lives in Self-test.