Every turn you type in Claude Code costs more than the last. By turn 200, you're paying 10x for the same work. By turn 664, it's 27.3x.
I didn't guess these numbers. I measured them across 42 of my own sessions:
- My worst session: 664 turns, 27.3x waste factor, burned 192M tokens
- 20 out of 42 sessions ran at 5x+ waste or higher
- Across my sessions: 744M tokens consumed. With rotation: 233M. That's 69% less quota in my case
- I also found a prompt caching bug in Claude Code 2.1.69 to 2.1.89. 15 of my sessions had broken caching, one running 196 turns at 0% cache ratio
So why does this happen, and what did I build to fix it?
The Problem: Every Turn Re-sends Everything
Claude Code re-sends your entire conversation history on every single turn. The cost grows linearly while useful output stays flat.
Real data from my worst session:
| Point in session | Tokens/Turn | Waste Factor |
|---|---|---|
| Turn 1 | ~20K | 1x |
| Turn 100 | ~100K | 5x |
| Turn 200 | ~200K | 10x |
| Turn 400 | ~350K | 17x |
| Turn 664 (end) | ~551K | 27.3x |
This is why your rate limit gets hit in 20 minutes. You're not doing more work, you're paying linearly more for the same work on every turn.
Why Manual Rotation Fails
You could rotate sessions manually, but you lose context and waste time re-explaining what you were doing. You never know the optimal rotation point. You break your flow every time. And the handoff between sessions is lossy: critical details get dropped.
How lossy? I measured it. On my last session rotation, only 35 out of 97 facts survived the handoff. That's a 46% preservation rate using text-similarity scoring. In token terms, re-discovery overhead is about 8% of your first 10 turns, so the raw cost isn't terrible. The real problem is which facts get dropped: commands run (6/44 preserved), errors hit (0/3), files read (0/5). The next session had no idea what failed or why.
How Clauditor Fixes This
I built clauditor, a CLI tool that hooks into Claude Code via 7 lifecycle hooks:
- UserPromptSubmit blocks bloated sessions and detects "continue" prompts that would waste tokens
- PreToolUse prevents known errors before they happen
- PostToolUse monitors tool calls and blocks during autonomous work when waste is high
- PreCompact / PostCompact measures what gets lost during compaction
- SessionStart initializes tracking and loads rotation context for new sessions
- Stop generates the final session report with waste analysis
It calculates your waste factor in real-time and blocks sessions when efficiency drops below a threshold, telling you to start a fresh session. When you rotate, it generates a structured handoff template so your next session picks up where you left off:
## TASK
Implementing OAuth2 flow for the dashboard API
## COMPLETED
- Database schema for tokens ✓
- Token refresh endpoint ✓
- Unit tests for refresh flow (14 passing) ✓
## FAILED APPROACHES
- Tried passport.js, incompatible with our middleware chain
- Redis session store caused race conditions under load
## CURRENT STATE
Working on: Authorization code flow
Blocked by: CORS config for redirect URIs
Next step: Add allowed origins to nginx.conf
This preserves what actually matters: the structured decisions, failures, and next steps. Not a lossy summary.
The Rotation Economics
Most people miss this part: rotation isn't just about stopping waste, it's a net positive.
- Rotation saves 65% of tokens per turn on average
- Re-discovery costs ~17K tokens, about 8% overhead in your first 10 turns
- At 10x waste, the ROI is 400x. You spend 17K tokens re-discovering context and save millions by not running at 200K+/turn
In my data, clauditor blocked 10 sessions from burning more quota. With rotation on all 42 sessions, I would have used 233M tokens instead of 744M. Your numbers will vary depending on session length. Run clauditor report to see your own.
The Bug Nobody Knew About
While building clauditor, I discovered that Claude Code versions 2.1.69 through 2.1.89 had a prompt caching bug causing 10 to 20x token burn.
Running clauditor doctor on my sessions found 14 sessions with degraded caching. The worst: 196 turns running at 0% cache ratio, meaning every token was billed at full price with zero caching. Another session dropped from 100% cache to 20% mid-session.
I didn't set out to find bugs, but when you measure token usage at this level of granularity, anomalies become visible. Run clauditor doctor to check if your sessions are affected.
Install It
# npm
npm install -g @iyadhk/clauditor && clauditor install
# Homebrew
brew tap IyadhKhalfallah/clauditor && brew install clauditor && clauditor install
# Zero install
npx @iyadhk/clauditor
Then run:
-
clauditor reportto see your waste factors across sessions -
clauditor doctorto check if your Claude Code version has the caching bug -
clauditor handoff-reportto measure how much knowledge your last rotation lost
272 GitHub stars, 6,000+ downloads, 275 tests, MIT licensed. Runs locally, no cloud dependency.
GitHub: github.com/IyadhKhalfallah/clauditor
Website: clauditor.ai
What's your worst waste factor? Run clauditor report and drop your number in the comments. I'm curious how it compares to my 27.3x.
Top comments (0)