We opened a real Codex session and found problems you won't believe
The waste in one session was absurd.
More than 600K tokens were not doing work. They were re-paying for mistakes that were already over: stale file reads, a git rebuild loop, debug output from a bug fixed forty turns earlier, and the rediscovery scramble that follows every auto-compaction.
Your agent doesn't remember any of this happening. But it pays for all of it, every single turn.
A mistake in a chat is paid once. A mistake in a context window is billed on every turn after it.
The Bill, Itemized
Agent Doctor reads a real Codex or Claude Code session and labels each class of waste. Here is one audit of a single session:
| Problem | Type | Wasted |
|---|---|---|
| Post-Compaction Rediscovery | structural accumulation | 83,919 tok |
| Long-Abort Disk Side-Effect | platform defect | 28,389 tok |
| Invalid Completion Debt | human cost | 17,876 tok |
| Git Rebuild Loop | model behavior | 7,993 tok |
In this audit, the top visible problems accounted for more than 600K tokens of wasted effort — before the deeper semantic failures were even counted. This is one session. Yours will look different, but it is rarely clean.
Why the Meter Keeps Running
The failure chain is mechanical, not mysterious:
Notice what this means: the model was never the problem. Your agent didn't get dumber. It was reasoning inside a window where its own history kept outvoting your task.
Almost All of It Is Avoidable
Here is the part nobody tells you: most of these problems don't need a smarter model, a bigger window, or better prompts.
They need you to leave earlier.
Every session has a precision curve. For the first twenty turns, nearly every token in the window still serves the current task. Past that, the window fills with old plans, old reads, and old debugging — and the model starts paying attention tax on all of it. When compaction finally fires, it decides what survives, and it decides badly.
Compaction is not memory. It is lossy compression with opinions. The single highest-leverage move in agentic coding is to move to a fresh session before compaction ever happens.
Shorter sessions are not a discipline hack. They are how precision works.
The Short Session Protocol
Three moves:
Audit
Run Agent Doctor on your sessions. See which problem classes you actually hit — not which ones you guess you hit.
Exit before compaction
Keep sessions under ~20 turns. Never let auto-compact decide which of your decisions survive.
Carry only clean state
When you start fresh, move exactly five things forward:
You can do step 3 by hand. It works. It is exactly what Echo automates — it builds the clean handoff for you, so every new session warm-starts with effective context instead of a cold rebuild.
What Your Report Tells You
Agent Doctor generates your Context Efficiency Report from your own sessions:
- which problems your agent actually hits, ranked by token cost
- which of them are avoidable with shorter sessions and clean carries
- the total you would save if you avoided them
Then it translates that number into things you feel:
If a third of your window is dead weight, you are paying a plan tier for tokens that buy you nothing. Cut the waste, and the plan you "need" is often one tier lower.
Every context rebuild is time you spend watching the agent re-read files it already read. Clean sessions skip the rebuild.
A short, clean window is the difference between an agent that follows your constraints and one that forgets them on turn 40.
Do This Today
- Generate your Context Efficiency Report. See what your agent has been carrying and what avoiding it is worth.
- In your next session: exit before compaction, and carry the five things forward.
Agent Doctor is the diagnosis
Short sessions and clean handoffs are the first treatment. Real memory is the cure.