v1.28.0 ·
The cheapest token is the one you never carry
You are not paying for the model to think. You are paying for it to remember. Across every token this project has spent building itself, 56 lifecycle instances and about 10.9 billion tokens, 95.9% were cache reads: the model being handed, again, the conversation it was handed last turn. Cache writes were 3.7%. Output, the part the model actually produced, was 0.4%. What I typed was 0.001%.
Every call in an agentic session re-sends the whole conversation. Caching makes that cheap per token, since a read costs a tenth of fresh input, but not free, and the thing being multiplied grows all day. A thousand tokens appended mid-session cost about 25 times their write price over the rest of it, because they were re-read an average of 304 more times. A 6KB file pasted just to have it in context is that decision multiplied by every turn left.
It also means the same work costs more late in the day. Before any of this was fixed, average resident context across the first 49 instances rose from 84k in ideation to 354k in testing and 812k in maintenance. The final write-up step, doing comparable work in a fresh session, ran at 81k. That is not a step being complicated. It is a step being late.
Caching already does the heavy lifting. This project, as metered, cost $9,737.82. The same tokens with no caching would have cost $60,507.74, so caching saves 83.9%. What remains is 96% carrying cost. The lever is not thinking less. It is carrying less.
What AIDLC does about it
State lives in files under .aidlc/state/: which phase an instance is in, which criteria exist, which tasks are ticked, what the design decided. None of it lives in the conversation, so the conversation is disposable. A phase boundary is where you start a fresh session. In one long chat you cannot, because ending the chat loses the plan. That, more than ceremony or rigour, is the cost difference between a lifecycle and vibe coding.
A fresh session is only cheaper if it does not re-read everything to catch up. Each phase skill lists exactly what to read on entry, and the list is closed. Testing reads the requirements and not the design. The release step reads neither, only the test results and state files. That is a few kilobytes to enter the most expensive stage, against hundreds a continuing session would carry.
Exploring a codebase is the costliest habit, so what is learned is recorded once and queried: aidlc knowledge query cost. Answers are budgeted at 2,000 tokens by default, where the same exploration is tens of thousands of tokens of file bodies sitting in the prefix. Compiled skills, guidance and context documents stay stable across a session, and nothing over 2KB is inlined into a skill body. Large guidance goes in as a pointer, read once and cached. The 83.9% above is what a stable front buys.
And it reports the driver, not just the total. This feature's own cost, from aidlc cost cost-driver-integrity, was $12.73 over 2.0 hours: 60.2% of spend on re-reading, an average context of 144k, $0.22 per response, 59 responses. "$12.73" tells you nothing. "60% of it was re-reading a 144k prefix at 22 cents a turn" tells you what to change. aidlc cost context shows resident context against a 150k budget. It is a report, never a gate.
Where it did not work
The rule shipped on 2026-09-10. Average context fell 42% in requirements (174k to 100k), 25% in design (182k to 137k), 22% in implementation (274k to 214k) and 18% in testing (354k to 292k). The release stage, 17.8% of all spend and the most expensive, went from 413k to 406k, down 2%.
The reason is behavioural. That is where you are deepest into a session, most reluctant to restart, and most sure you are nearly done. The target I wrote down in advance was under 150k for the release and testing stages. They are at 406k and 292k. That target is not met, and I am recording it as not met. The mechanism works where sessions break naturally. It does not yet work where a person does not want to break one.
I also got my own bill wrong, and both errors were flattering. The meter double-counted by 1.85 times for a month. Claude Code writes one transcript line per content block and repeats the usage object on each, and I counted lines. A call using three tools was billed three times, and 46% of usage records were duplicates. The error grew with parallel tool use, which is the cheapest thing an agent can do. The correction across the full history took $9,673 down to $7,134.
Then the fix's own instrument lied. It divided token totals over every ledger entry by response counts carried on only a handful, and printed an average context of 21.5 million tokens as though it were measured. This release makes numerator and denominator range over the same entries, and marks derived figures with ~ when only part of the ledger is counted.
Also, 43.3% of spend, about $4,220, sat in an unattributed pool, and the only place showing it printed an entry count with no dollars. The default report now ends with that line. On 2026-09-14 it read $4218.43 across 10062 entries. It grows because unclaimed work accumulates, which is the point of putting it where someone sees it.
What it still does not do
Per-stage model routing is the largest saving I have not realised. The release and testing stages are 24.5% of spend and the most mechanical work. Simulated on the real token mix, routing them to a cheaper model saves 39%, and 57% with the context cap. It needs platform support that does not exist, so I do not offer it.
Subagent work is invisible to cost. Its usage lands in the parent session's transcript, and with no claim on the parent, the instance reads no data. The always-on lessons file is 83.7KB, about 21k tokens, read in full by eight phase skills, and carrying it has cost about $246. There is no digest yet.
If you do agentic work with or without this, the savings in order: end sessions at natural boundaries, which is worth 31% on this token mix and only possible if state is in files. Re-read from a list, not from instinct. Prefer an edit to a rewrite: 6KB on average across 700 whole-file writes against 1.2KB across 1,294 edits. Batch independent tool calls, since only 10% of responses here made more than one, and the saving is roughly 8% of spend. And read true cost, not own cost. Cost tracking reported $153.65 for itself against a true cost of $219.78 once its two bugfixes were counted.