Understanding Contexts — What the Model Remembers
Getting Started: Understanding Contexts — What the Model Remembers
Understanding Contexts — What the Model Remembers
Series: Claude Learning Journey · Getting Started
Context is the information Claude has access to in a given session. It is the working memory of the model — everything you have said, everything it has read, and everything it has been given in system prompts or attached files. Understanding contexts is the difference between using Claude blindly and using it deliberately.
What is in a context
A context has several layers:
System prompt: The instructions that define Claude’s behaviour — who it is, what it should do, how it should respond. This is set once and persists through the session.
Conversation history: Every message you have sent and Claude has received in this session. This is why Claude can refer back to something you said 10 messages ago.
Attached files and documents: When you attach a file to a conversation, its contents are added to the context. Claude can read and reason about it without you copying and pasting text.
Conversation context: Claude can read files, run searches, and perform other actions during your conversation. These results are added to the context automatically — you do not need to paste output back in.
The context window
Every model has a maximum context window — the total amount of text that can be active at once. Current Claude models support 200,000 tokens, which is roughly 150,000 words or about 500 pages of text. That is large but not infinite.
When the context fills up, older information drops out. Claude cannot retrieve what is no longer in context unless you re-provide it. This means:
- A conversation that starts with a project overview will lose that overview once the context fills with later work
- Files read early in a session may not be accessible late in the session
- Long conversations on large codebases eventually forget earlier files
The practical implication is that you should not assume Claude knows something just because you told it earlier in the session. If you are working on a long task and need Claude to remember something specific, re-state it or re-attach the relevant file.
Making contexts work for you
Lead with the relevant context. At the start of a session, provide the files, documentation, and context that are most relevant to what you want to do. Do not make Claude guess what it should know.
Use tools to give Claude direct access. Attaching a file is better than pasting its contents into a message. Claude reads files via tools more efficiently than human-pasted text — the tool result is structured and clean.
Summarise for yourself if you need to preserve state. If you need Claude to work across a long session on a complex project, periodically ask it to summarise what it has done and what the current state is. This creates a checkpoint you can re-inject if needed.
Be aware of what is expensive to hold in context. A 5,000-line file costs roughly 5,000 tokens every time it appears in context. If you have many large files open simultaneously, that eats your budget fast. Use focused reads — read the specific function, not the entire module.
Context and memory are different
Context is session-specific. Memory (discussed in a later post) is persistent across sessions. Do not confuse the two:
- Context — what is active right now in this session
- Memory — what survives between sessions via files
Claude cannot access your memory files unless you explicitly read them into context at the start of a session. This is a deliberate design. Your memory files are yours to manage, not automatically available.
When context is the constraint
Some tasks are context-limited, not capability-limited. If you are working on a very large codebase and Claude keeps losing track of important files, the issue is usually context management rather than the model:
- Read files only when needed, not speculatively
- Close files you are done with by moving the conversation forward
- Ask for summaries of large files rather than the full content
- Break large tasks into smaller sessions with explicit context carry-over
Try it yourself
Start a session by attaching a file you are working on and asking Claude to describe it. Then have a long conversation about something else. Partway through, ask Claude about something from the attached file and notice whether it still has access. This demonstrates context vs memory directly.
What’s Next
Now that you understand context, the next skill is the basic mechanics — how to issue commands, how to correct Claude when it goes wrong, and how to structure your exchanges for good results.
Part of the Claude Learning Journey series · Next: Basic Commands and How to Talk to Claude