Find out where your agent tokens go
One prompt that makes Claude Code, Codex, or Cursor audit your own sessions, trim your
agents.md, and set up cheaper subagents. Get it free when you join the
waitlist for AI Fundamentals, the course on agentic coding for developers.
Join the AI Fundamentals waitlist and get the cleanup prompt by email
Free. No spam. Unsubscribe anytime.
What the prompt found for one reader
A developer ran this prompt on their last 7 days of sessions. Output was only about 6.7M tokens. Almost everything else was context being re-read.
tokens used in 7 days across 133 transcripts
of those were cache reads: old context re-sent on every call
of calls carried more than 400K tokens of context
of subagent usage ran on the most expensive model
Three root causes it surfaced
- 1
A 1M context window as the default model
Sessions grew to 500-800K tokens before anything compacted them, and every turn re-read the whole thing. That alone covered more than half the spend.
- 2
Subagents inherited the expensive model
The instructions asked for subagent-driven development but never named a model, so all 70 subagents ran mostly on Opus with contexts of 285-500K tokens.
- 3
Screenshots stayed in context
1,153 tool results contained images, about 500 of them from a Simulator MCP. Each one stayed in context for the rest of the session.
Spend fewer tokens, keep the quality
You do not need to know where the waste is. Your agent finds it, and you review what it proposes.
Finds where your tokens go
Your agent analyzes the sessions of the past week and shows which sessions, models, and tools cost the most.
Audits your agents.md
It checks whether you load unnecessary resources into context for every new task, so a small tweak stops carrying release notes and CI details.
Adds an orchestration plan
Big tasks get a smarter model for orchestration and cheaper models for execution, with the smarter model verifying quality.
The same pattern shows up in my own sessions
I analyzed 1,674 of my own agent sessions. The biggest saving is not shorter replies. It is guarding what your agent reads.
of all tokens were cache reads
were the agent’s actual replies
of subagents inherited my main model while only searching
From signup to a leaner context in minutes
Join the waitlist
Enter your email below. It takes a few seconds.
Get the prompt by email
The cleanup prompt lands in your inbox right away.
Paste it into your agent
Run it in Claude Code, Codex, or Cursor and review the changes it proposes.
This prompt is a first taste of AI Fundamentals
Token waste is a symptom of unmanaged context. AI Fundamentals teaches you a repeatable, tool-agnostic way of working with agents: clear context, reliable instructions, subagent orchestration, and validation loops. Joining the waitlist gets you the prompt now and a note when the course opens.
Frequently Asked Questions
Is the prompt free?
Yes. You get it by email when you join the AI Fundamentals waitlist. There is nothing to buy.
Does it work with Claude Code, Codex, and Cursor?
The prompt is tool-agnostic. It needs access to your recent session history, so it works best in tools that keep local session data, and the more history your agent can reach, the more specific the results.
What else will I receive?
You will get the prompt and a note when AI Fundamentals opens. You can unsubscribe at any time.
What is AI Fundamentals?
A course on agentic coding for developers. It teaches a tool-agnostic system for working with AI agents: clear context, instructions, and validation loops that reduce risk, tech debt, and wasted tokens.