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.
The /context command shows where tokens are being used
One /context command shows the “bill” right away: who's taking how much space on the machine's desk. Make checking this table a habit, just like reading a bank statement.

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:

  1. 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.
  2. 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).
  3. Be picky about MCP. Before plugging in an outside tool, check how much space it takes with /context. Unplug what you don't use.
  4. New job, new session. /clear is your best friend.
  5. Compact proactively at natural rest points in the work, with instructions on what to keep.
  6. 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.
Habits for tidying context to the rhythm of work
A lean work rhythm: give specific commands, compact at rest points, new job new session. These three habits cut the token bill sharply while quality goes up.

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

  1. Open a new session, type /context, read the table and answer: which part takes up the most, and can it be cut?
  2. Do a long piece of work, then try /compact with instructions, and compare before and after with /context.
  3. Type /model, see which model is in use, and try changing the thinking level.
  4. 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.

MONA has a podcast: listen instead of readingEpisodes on AI, automation & SEO for Vietnamese businesses
Nghe ngay
About the author

CEO & Founder · The MONA

The founder of The MONA built a service company of 60+ staff with 14,000+ projects delivered. Khánh Hùng shares his thinking on building self-running systems, automating a business, and the real lessons behind MONA's projects.

Views 308
Rate this article 4,7/5 · 18 ratings

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!

Contact Mona

    MONA có riêng một Người "Bạn Thân" cho bạn - Người Account sẽ đồng hành, hỗ trợ, hướng dẫn, đặt đồ ăn cho bạn mãi mãi, từ đây về sau!
    MONA will never sell your information or send you spam
    The MONA team advising on an online education management system
    Hỏi đáp giáo dục 4.0
    Tạo cuộc hẹn miễn phí với MONA để giải đáp và tư vấn mọi thắc mắc về giải pháp số hoá ngành giáo dục
    Thời lượng cuộc hẹn
    45 Phút
    Ngày và giờ
    Thứ 2, ngày 25 tháng 12, 2023
    [9:30 - 10:15]

      Chọn ngày và giờ
      Khung giờ
      Back
      Hãy cho MONA biết bạn là ai
      0:00