AI Compass / Knowledge cards
Keeping context clean
fewer tokens, clearer answers
The context is everything the model reads along when it answers: instructions, history and files. In Claude Code it grows with every message, because every request sends the entire history so far. Old failed attempts and finished side tasks therefore cost tokens again with every further message.
What it is for
Your subscription quota lasts longer, or with pay-per-use billing you pay less. Long tasks stay on target because the history is not full of old traces.
Steps
- Check where the usage goes:
/usageshows cost and quota,/contextshows what currently occupies the context. - When a new, independent task begins:
/clearand give only what is needed again. - After a failed attempt, rewind instead of patching: with an empty input field press Esc twice or call
/rewind, then continue writing with the new direction. - Pass long work on via a handoff file. A custom command writes task, status, constraints and problems found into a file with a fixed structure. Then
/clearand read the file in the new session. You define the structure yourself. - If the history is still needed, compact it yourself, that is, have it summarised, and say what must stay, for example
/compact keep decisions and open bugs. See Limits. - Hand research and refactoring where only the result counts to subagents, and explicitly ask for that in the prompt.
- Keep small what is always loaded: if a service offers both a command-line tool and an MCP server (an interface that provides tools to the agent), use the command-line tool. According to the docs, Claude Code only loads an MCP server’s tool descriptions once a tool is needed (before that, only names and server instructions are in the context). But the command-line tool needs no entry at all. Limit long terminal output: the default is 30,000 characters, adjustable with
BASH_MAX_OUTPUT_LENGTH.
Limits
- Contradiction open: In April, AI LABS advises compacting manually at a chosen point before the context reaches roughly 300,000 to 400,000 tokens. That is a rule of thumb from an Anthropic post that the video cites. In August, the same channel advises avoiding
/compactaltogether. Common denominator:/clearfor independent work, otherwise prefer a handoff file over a summary in the middle of the task. A middle way is in the docs: in the/rewindmenu, “Summarize from here” summarises only the history from a chosen point, and the beginning stays verbatim. Whether the threshold holds for current models has not been checked. - Rewinding only resets the history and the file changes that Claude made with its own editor. According to the docs, changes made through Bash commands, through most subagents and outside Claude Code remain. You have to undo those yourself, for example with git.
- AI LABS recommends 10,000 characters as the limit for terminal output. If it is too tight, error messages go missing.
- The creators’ savings figures are not substantiated. “95.4% waste” from Jack Roberts names no method.
- According to the video, the cited advice comes from the “inventor of Claude Code”. That is not substantiated.
Links
- Maintaining your Claude Code setup: what is loaded permanently in every session before you type anything.
- Model choice: cost per task: Cost is tokens times price. This card reduces the tokens.
- Checkpoints and gates: There, every sub-agent starts with fresh context.
- Project map instead of rereading: a map of the code so that Claude does not search anew every session.
Sources
- AI LABS: This Is The Anthropic Team’s Greatest Advice, 22 April 2026, 3:43–12:20. Sponsored by Verdant (6:25–7:30), plus self-promotion for the paid community
- AI LABS: How To Never Run Out Of Codex and Claude Usage Limits, 28 August 2026, 3:17–4:54, 10:19–13:30, approx. 16:46–17:18. Self-promotion for the paid community, plus Supabase praised without an ad disclosure
- Jack Roberts: Paste This Into Claude, Never Hit a Token Limit Again, 29 August 2026, 1:05–2:43. Sponsored by Genspark (9:38–12:24)
- Claude Code docs: Commands (
/usage,/context,/clear,/compact,/rewind), Checkpointing, Costs (command line instead of MCP) and Environment variables (BASH_MAX_OUTPUT_LENGTH), retrieved 11 October 2026
Status
Checked 11 October 2026 · Maturity new (built-in tools, described in the docs; nobody has measured the effect independently)
Want to try this with your team? That’s what the AI Lab is for. See the AI Lab