How do I use fewer Claude tokens when I build?
November 6, 2026
Have your agent do less work. Search for software that already exists, give it small files to read, and keep each session short. Work your agent never does costs nothing.
This post is about your own Claude session. For what an app costs once it runs, read Do prebuilt apps and components help me save tokens?
Where do your tokens go?
Three things add up in a Claude Code session.
- Writing. Code your agent writes is output. Anthropic lists output at five times the price of input on its newest models.
- Reading. Each file your agent opens joins the conversation. It stays there until you clear or compact.
- Resending. The model remembers nothing between requests. So Claude Code sends the whole conversation every time. A cache makes that cheaper, not free. Sonnet 5.5 cache hits cost $0.10 per million tokens, against $2 for new input.
That last one catches people. A one-line question in an all-day session still draws on the whole conversation.
Can your agent skip the work?
Often, yes. Code that already exists costs nothing to write. Before your agent starts, ask whether someone has built it:
/mothermachine <what you need>
mothermachine lists software your agent can change or run. Of the 137 listings built to be changed, 114 need only new settings. Your agent edits those settings instead of writing an app. Browse the directory to see what's there.
Can your agent read less?
Yes. Give it the smallest file that answers the question.
- Use text, not PDFs. Anthropic says a PDF page uses 1,500 to 3,000 tokens of text. Each page also goes in as an image, and that costs extra. Plain text and Markdown skip the image.
- Use Markdown, not web pages. A typical mothermachine listing is 16 KB as a web page. The same listing is 9 KB as JSON and 5 KB as Markdown. Your agent can read the small one.
- Point at the right files. Each listing you can change names its config files. Many also name env vars and prompt files. Your agent can open those and skip the rest of the repo.
- Ask for one thing. Anthropic warns that "improve this codebase" starts a broad scan. Asking for one fix in one function needs far fewer reads.
Does your agent need to click through screens?
Not if the software gives it another way in. A screenshot is an image, and images cost tokens. Anthropic puts a 1920 by 1080 image at 2,691 tokens on recent models. A command or an API call returns text instead.
Anthropic says command line tools use less context than MCP (Model Context Protocol) servers, because they add no tool list. MCP servers add little at first. Claude Code loads their tool names and holds the details until needed. Turn off any server you aren't using.
On mothermachine, 137 of our 149 listings have a command line, an API, or an MCP server as their interface. Each listing names which one.
What habits help in a session?
- Pick your model first. Anthropic says Sonnet handles most coding tasks well. Sonnet 5.5 costs $2 per million input tokens, and Opus 5.5 costs $4. Save Opus for hard design calls, and give simple subagent jobs to Haiku.
- Stay on one model. Each model has its own cache. If you switch mid-task, the next request rereads the whole conversation with no cache hits.
- Clear between tasks.
/clearcosts nothing and starts fresh. Use it when the next job has nothing to do with the last one. - Compact at a natural break.
/compactswaps your history for a summary. It costs the most after a long break, so run it before you step away. - Keep CLAUDE.md short. It loads at the start of every session. Anthropic suggests under 200 lines. Move long instructions into skills, which load only when used.
- Check the numbers.
/usageshows your usage, and/contextshows what fills the conversation.
What have we not measured?
- Your savings. We have not tested these habits on a real project.
- Tokens per listing. We measured file sizes, not tokens. Token counts change by model.
- Other agents. The commands here are for Claude Code. The ideas should carry over, but check your own tool's docs.
- Next month. Claude Code changes often. We read these docs on November 6, 2026.
Frequently asked questions
How do I see what is using my Claude tokens?
Run /usage in Claude Code. On a paid plan, it shows what counts against your limits. Run /context to see what fills the conversation.
Does Markdown use fewer tokens than a PDF?
Yes, for the same text. Claude reads each PDF page as text and as an image. Markdown sends only the text.
Should I use /clear or /compact?
Use /clear when the next task is unrelated. It costs nothing. Use /compact when you want to keep going with a summary.
Does switching models waste tokens?
It can. Each model has its own cache, so the next request reads the whole conversation with no cache hits. Pick your model when the session starts.
Do MCP servers use a lot of tokens?
Not at first. On supported models, Claude Code loads tool names and holds the details until needed. Command line tools use less, because they add no tool list.
Do prebuilt apps save tokens?
Yes. Your agent configures or imports code instead of writing it. Do prebuilt apps and components help me save tokens? has the details.
How much will these habits save me?
We have not measured it. The saving depends on your project, your model, and how you work.
Sources
- Manage costs effectively. Anthropic, read November 6, 2026.
- How Claude Code uses prompt caching. Anthropic, read November 6, 2026.
- PDF support. Anthropic, read November 6, 2026.
- Vision. Anthropic, read November 6, 2026.
- Pricing. Anthropic, read November 6, 2026.
- Listing sizes. The median file size across our 149 listings, measured November 6, 2026.