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. A ready-made version is the skillhandofffrom Matt Pocock’s collection: according to the README, it summarises the current session in a handoff document that another agent continues from. - 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. Ask short side questions about the current state with
/btw: according to the docs, the question and answer do not go into the history, but they have no tools. - 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. For strong models, a first piece of evidence speaks against avoiding/compact: in a preprint of 3 November 2026, the accuracy of Claude Opus 4.5 with frequent compaction stayed within −3.7 to +5.6 percentage points of the baseline on six benchmarks with long multi-step tasks. An open-weights model, by contrast, collapsed, see the quick read Short context is often enough. - 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.
- Cutting repeated costs – TokenEconomizer put to the test: a plugin that learns from earlier sessions and switches off unused tools. Step 7 here explains why the lever for MCP tools is smaller than the video says.
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, plus Interactive mode (/btw), retrieved 6 November 2026 - Matt Pocock: skills, README (skill
handoff, MIT licence), retrieved 23 October 2026. Presented by Jack Roberts, 7 Free Repos That Make Claude So Good It Feels Illegal, 18 October 2026, 7:25–7:57 - Muralidharan et al.: You don’t need long context, arXiv 2611.05306, 3 November 2026, retrieved 6 November 2026. Preprint, not peer reviewed
Status
Checked 11 October 2026, extended 23 October and 6 November 2026 · Maturity new (built-in tools, described in the docs; nobody has measured the effect independently)
More quick reads for this card
You can try this with your team in the AI Lab. See the AI Lab