Context
The context (context window) is everything Claude Code has in front of it during a conversation: the instructions from CLAUDE.md, your messages, its replies, the files it has read and the output of commands. It has a limited size, measured in tokens. As it fills up, Claude can “forget” early instructions and makes more mistakes, and every new message costs more.
Everything Claude “remembers” in the current conversation: messages, files read, results. It has limited room, like a workbench: too cluttered, and it’s hard to work.
How it shows up in Claude Code
The context starts filling before you type anything: at startup Claude Code loads CLAUDE.md, auto memory, the names of MCP tools and the descriptions of skills. After that, every file read and every command result is added. The Claude Code documentation says plainly that the context window is the most important resource to manage. You have three commands for it: /context shows what is taking up space, /clear empties the conversation and /compact summarizes it. When you get close to the limit, Claude Code makes a summary on its own (auto-compaction).
Example
You’ve spent an hour on a website’s menu and now want to fix the contact form. First you type:
/context
You see that most of the space is taken by the menu files, which no longer help. You type /clear and start the new task with a clear prompt. Claude begins with a clean context and doesn’t get tangled up in the menu discussion.
Common mistakes
- One conversation for every task of the day. The context fills with unrelated material. Use
/clearbetween different tasks. - “Investigate the whole project” with no limits. Claude reads hundreds of files and fills the context. Narrow the search or hand it to a subagent, which works in its own context.
- A very long CLAUDE.md. It loads at every start and always takes up space, so the important rules get lost.
- Thinking Claude remembers between conversations. A new conversation starts without the old one’s history; what Claude must always know goes in CLAUDE.md.
Related terms and where you learn it
The context is measured in tokens, summarized with /compact and belongs to a session. CLAUDE.md loads into it at every start. You learn it in the lesson “How do you look after the conversation memory?” in module 04, The working method, step by step, and the money-saving tricks in module 11.
Source: Claude Code documentation: Explore the context window
How it appears in the course
Claude has a working memory in every conversation: the context window.
How do you look after the conversation memory? · Module 04, The working method, step by step
The context is everything Claude “remembers” in the current conversation: the messages you’ve exchanged, the files it has read, the results of commands.
Which keys and shortcuts should you know from the start? · Module 00, Installation and first steps · free
Then type /context and /cost. Get into the habit of checking how much you’re using.
Practice · Module 00, Installation and first steps · free
Learn Claude Code from zero, in plain English
12 modules with 1–2 minute lessons, which you can also do on your phone. The first two modules are free.