25 July, 2026
Lesson 6: Context and tokens, why long chats get worse and how to keep them sharp

🎓 Free course: Claude Code basics, lesson 6/10. The whole course is in the category Free AI courses package from MONA?
After this lesson, you'll understand how an AI's “short-term memory” works, be able to see where your token money is flowing with a single command, and know the set of habits that make the machine both smarter and cheaper. It sounds technical, but it's really a lesson about managing cost and quality, right in a businessperson's line of work.
Context window: the machine's work desk
Every AI model has a context window: the total amount of text (measured in tokens) it can “hold” in its head at one time, for example around 200,000 tokens for a large model. Picture it as a work desk: however wide the desk is, it can only lay out that much paper. The longer the chat session, the higher the paper piles up, and just like a real person, the messier the desk the muddier the work. Answer quality declines as the context fills up, which is a property of every model today.
Something few people know: the moment you open a new session, before typing a single word, the desk already has a few tens of thousands of tokens of paperwork on it. Type the command /context and look: it lists clearly who is taking up space:
- System prompt: your CLAUDE.md + rules + memory layers (lesson 4), loaded at the start of every session.
- System tools: descriptions of the machine's built-in toolkit (reading files, editing files, running commands, web search, planning…), eating about 15-17 thousand tokens that you can't cut.
- MCP tools: outside tools you plug in yourself (lesson 8). You control this part, and it is also the part that bloats most easily.
- Messages: the actual exchange between you and the machine.
- Free space: the space remaining.

Why care? Because you pay for every token on the desk, including what's loaded silently. A CLAUDE.md stuffed with 10,000 tokens gets charged again every time you open a session. A sloppy MCP can swallow 20% of the desk the moment you plug it in. Tokens are money, and a crowded desk also makes the machine answer worse: a double loss.
Compact and clear: clearing the desk at the right time
Two cleanup commands to know by heart:
/compact: compresses the whole conversation history into a high-density summary, freeing up the desk while keeping the main points. The machine also does this itself when the desk is nearly full (autocompact), but compacting proactively at a point you choose gives better control. A good tip: compact with instructions, like “/compact prioritize keeping the design decisions and the list of unfinished tasks”.
/clear: wipes everything, a spotless blank desk. Use it when switching to an unrelated task. This is the habit beginners skip most: done with job A, they casually ask about job B in the same session, so job B gets contaminated by the mountain of context from job A. New job, new session. Remember: opening a new session loses nothing, because everything worth remembering is already in CLAUDE.md.
A tip for people who like watching the clock: the command /statusline lets you customize the status line at the bottom of the terminal screen, for example adding a bar showing the percentage of tokens used, so you see at a glance when it's time to clear the desk. (The newer terminal version can adjust this, while the graphical version can't, one more reason to stick with the terminal.)
Choosing a model and adjusting thinking level
The command /model lets you swap the “brain” between sizes: the large model (Opus) is the smartest but most expensive, while the medium (Sonnet) and small (Haiku) are much cheaper. The spending principle is the same as assigning work in a company: give hard jobs to the best person, and don't make the director do the odd jobs. In lesson 9 you will see this principle become a system: child agents on cheap models do the heavy lifting and return only a summary to the parent agent on the premium model.
Inside /model there's also the thinkingoption: when on, the machine gets to “draft” in a separate thinking space before answering. The nice part: that scratch space doesn't pile onto the conversation history (though it's still billed while running), so the final answer is concise yet deep. For work that needs a lot of reasoning, turn on thinking and tell the machine “answer briefly, I'll ask more if needed”, a very effective desk-saving combo.
Habits that keep the machine smart and the bill light
Collecting the official recommendations plus our own daily experience:
- Give specific commands instead of vague ones. “Fix the price display error on the checkout page, the checkout file” beats “improve this website for me” every time. The more on-target the command, the less the machine wanders and the fewer tokens burn. This is the highest-return tip, and it costs nothing.
- Keep CLAUDE.md lean (200-500 lines, lesson 4); anything that is a “task” rather than a “rule” should become a skill, because a skill is only loaded when called (lesson 7).
- Be picky about MCP. Before plugging in an outside tool, check how much space it takes with /context. Unplug what you don't use.
- New job, new session. /clear is your best friend.
- Compact proactively at natural rest points in the work, with instructions on what to keep.
- Need to unload a long thought by voice? Unload it into a cheap-model session first, ask it to compress it into a tight brief, and only then give that brief to the premium model. Don't pour the whole “um, uh” stream into the expensive session.

If you look closely, this whole lesson boils down to a familiar management saying: don't make one person carry too much at once and then blame them for sloppy work. The same goes for machines. A good manager splits work, splits context, splits people. Lessons 7 and 9 are about learning to “split people” for AI.
Try it yourself before moving on to lesson 7
- Open a new session, type /context, read the table and answer: which part takes up the most, and can it be cut?
- Do a long piece of work, then try /compact with instructions, and compare before and after with /context.
- Type /model, see which model is in use, and try changing the thinking level.
- Set yourself the rule “new job, new session” for a week and feel the difference.
Lesson 7 teaches skills: how to package a business process (like “scan for unfulfilled orders”, “draft a welcome email to new customers”) into a file that teaches the machine to do it again and again, so that one sentence is enough for it to know the route, just like handing an SOP to an employee.
Related articles
Professional website
design services
Own a website with a beautiful, 100% exclusive design and a lifetime warranty, with the ability
to expand features flexibly as your business grows, starting today!































Free AI courses
AI tools at work
VI
EN


