What drives costs
- Input context at every step: system instructions, CLAUDE.md, history, files read, command output.
- Model output: reasoning and code.
- The model: more capable models cost more per token.
On a Pro or Max subscription you pay a fixed price but have usage limits. On the API you pay per token. Either way, saving context means more work for the same money.
Techniques that work
| Technique | Why it saves |
|---|---|
/clear between unrelated tasks | the agent doesn’t carry the previous task’s history |
/compact in a long task | compresses history while keeping the essence |
@file references | no steps spent on searching |
| Subagents for exploration | hundreds of files stay in the subagent’s context |
| A short CLAUDE.md | it loads into every request |
| A simpler model for simple tasks | renames and formatting don’t need the strongest model |
| Unused MCP servers turned off | tool descriptions take up context |
What wastes limits
- One session all day for a dozen different tasks.
- "Read the whole project" when it isn’t needed.
- Pasting long logs and dumps in full. Paste the relevant lines.
- Vague tasks that make the agent do and redo.
How to watch costs
/context shows what fills the context. On the API, the Anthropic Console shows spend by day and key. For teams, split keys by project to see where money goes.
Course summary
You went from installation to hooks. The next step is to apply it all on one real project: CLAUDE.md, permissions, one skill, a reviewer subagent, a formatter hook. After that the agent works in your repository like a team member who knows the rules.
Today's task
For one day use /clear between tasks and @ references. In the evening compare how much of your limits is left versus the day before.