Short answer: your agent resends the whole chat on every turn, so long sessions get expensive. Do one task per session, then /clear.
Does starting a new session save money with coding agents?
Yes. A new session (for example after /clear) stops the agent from resending the whole old chat on every turn, so each turn sends fewer input tokens and costs less.
Why long sessions cost more
Models don't remember between requests. Every turn, the agent resends its instructions, tool definitions, every file it read and the whole chat. At 100,000 tokens of history, even "ok, continue" sends 100,000 input tokens.
Caching helps, but only while the session is steady
Repeated text can be read from cache at a much lower rate. Claude Sonnet 5.5: $0.49 per million input tokens, $0.03 cached (all prices). One 50-turn session averaging 80,000 tokens of context:
| Input tokens | Input cost | |
|---|---|---|
| Not cached | 4,000,000 | about $1.96 |
| Mostly cached | 4,000,000 | about $0.10 plus new text |
These reset the cache, so the next turn pays full price for the whole history:
- A break of more than a few minutes (usually about 5)
- Switching models
- Editing an earlier message, or turning tools or MCP servers on or off
Work in stages
- Have the agent write the plan to
PLAN.md. - Do one stage. Check it works.
- Have the agent update
PLAN.mdwith what's done. - Run
/clear(Claude Code) or/new(Codex), or open a new chat. Then: "read PLAN.md and do the next stage".
Other quick wins
/compactwhen you can't stop yet: it swaps the history for a short summary.- Put long logs in a file instead of pasting them; pasted text is resent every turn.
- Turn off MCP servers you aren't using.
- Check Activity in your Outrun dashboard to see which sessions cost the most.
- Paste a
ccusagereport into the Claude Code cost calculator to see what a day costs.