Solution · Cut agent spend
You pay for the same logs on every call. Send the model less.
Why is your agent bill so high? It sends the same logs and files to the model on every call. Context Mode sends only what the model needs: one long session cost 65.5% less, $7.20 to $2.49.
Your agent runs 401 tests. 1 fails.
Sent to the model
- The failing test and its error
- The summary line
Kept in your archive
- Every line, word for word
Size measured on the minitest test fixtures, Claude Haiku 4.5.
One example, measured by hand. How many versions of react are on npm?
Sent to the model
- The answer: 2,959 versions
Never sent
- The 7 MB file itself
One query, not a benchmark figure. The benchmark result is under Your bill.
One session, 30 steps. Tokens sent on each call.
Sent to the model
- Your recent work, unchanged
- An index of older work
Kept in your archive
- Older work, word for word
Here the agent can search its archive. Memory answers: 10, 10, 10 and 8 of 10.
The same task, run twice. Cost per task.
Archive search off in the 65.5% run. With it on: $7.24 to $2.97, 59.0% lower.
Your own Anthropic or OpenAI account pays the model. We add no fee on tokens.
Your agent sends it all. On every call.
A test run, a log or a JSON file enters the conversation and goes to the model again on every later call.
To answer one question about a large file, the agent reads it into the conversation, or sees only its first part.
Your agent sends the whole conversation on every call, and it grows with each step.
Keep your agent and your model. Change what each call carries.
- 01Shorten long output
Context Mode shortens test, build and log output the first time it sees it. Errors stay in full. The rest goes to your archive.
- 02Run data work as code
The agent writes a short script. Only what it prints reaches the model.
- 03Archive older work
The model gets your recent work and an index of the rest. Older details are looked up word for word.
- Shortens long tool output
- Runs data work as code
- Moves older work to the archive
The same task, run twice. Cost per task.
| Task | Context Mode | Without Context Mode | Lower |
|---|---|---|---|
| Long session, 30 steps, Opus 5.5 | $2.49 | $7.20 | 65.5% |
| Data work on large files, as a script, Haiku 4.5 | $0.062 | $0.175 | 64% |
| Test fix loop, minitest, Opus 5.5 | $0.061 | $0.157 | 61% |
The 65.5% run had archive search off. With it on: $7.24 to $2.97, 59.0% lower, memory answers 10, 10, 10 and 8 of 10. On Opus 5.5 the same data task was 9 to 10% lower.
Pre-registered paired runs at API list price, with task success equal in both arms. A short question with few tool calls leaves little to save; your own saving depends on your mix of work. Method and sources →
What this uses.
Pay for the failing test, not the ones that passed.
Analyze a 7 MB file. Pay for 407 bytes.
All-day sessions with no compaction. Older work is looked up word for word.
Choose how much history the model sees: 200K, 500K or 1M.
Where an agent's tokens go, and what Context Mode shortens.
Every paired run, with its evidence file.
Related: Long sessions · For developers · For startups · Plans
Keep your agent. Pay for less of what it reads.
npx @context-mode/cli connects your agents. 1,000 requests free, no card. Your own Anthropic or OpenAI account pays the model. We add no fee on tokens.