EVERY SPOKEN WORD
3 min read · 584 words- 0:00 – 0:03
Intro
- SPSpeaker
[upbeat music]
- 0:03 – 0:34
What “context” means in Claude Code (and what consumes it)
- SPSpeaker
Context is Claude's working memory. Every file it reads, every command it runs, every message you send, it all takes up space in the context window. Think of the context window as the amount of space that Claude can hold in its memory. Whenever you enter a prompt, Claude reads a file, runs a tool call, gets a tool call result. This is adding on to the context window. And since there's only a finite amount you can put in the context window, it becomes extremely
- 0:34 – 1:04
Automatic compaction: freeing space by summarizing history
- SPSpeaker
important to optimize this as much as possible. Now, when you approach this limit, the context window is automatically compacted. Compaction will summarize important details and remove the unnecessary tool call results and free up a lot of space in your context window. Do note, though, that this could potentially lose details in your previous conversation. You can run the compaction manually as well with the /compact command. This will compact everything that you've done up to
- 1:04 – 1:20
Manual controls: /compact vs /clear for different resets
- SPSpeaker
that point, which could be handy if you want to clear up context space, but also have a memory of what you previously worked on. If you want to completely start from scratch without memory of what was previously worked on, you can also run /clear, and that will remove everything, starting
- 1:20 – 1:35
Inspecting context usage with /context
- SPSpeaker
from scratch. To check the state of your context, run the /context command. Here, you'll get a big picture of how large your context size is, the different categories that are taking up the most context, and a graphic showing you all of this. A
- 1:35 – 1:51
Rule of thumb: when to compact vs when to clear
- SPSpeaker
general rule of thumb is when you're working on a specific feature and are going over the context window but need to continue, then compact. Keeping the context relevant for this feature is important when continuing development. If you have finished the plan and want to start on a new feature, then clear.
- 1:51 – 2:08
Persistent memory across sessions: use claude.md
- SPSpeaker
You don't want the previous conversation to present bias in anything new that you want to create. For things that you do want Claude to remember in other sessions, put it in the claude.md file. That way, it doesn't have to rediscover things from scratch all over again.
- 2:08 – 2:23
Prompt specificity reduces context waste
- SPSpeaker
Be specific. The irony behind writing a smaller prompt is that i- in the long run, it will take up more context. Without being explicit, Claude is forced to look around your code base more and do its own thinking, which takes up a lot more context window space than if you were just a
- 2:23 – 2:38
Tool overload: MCP servers and context footprint
- SPSpeaker
little bit more clear with a sentence or two. MCP servers load all of the tools available into context by default. So if you have a lot of MCP servers for things that are unrelated to the project, it might be worth turning them off.
- 2:38 – 2:53
Skills as a lighter alternative to MCP servers
- SPSpeaker
You can also try out skills, which work similarly to MCP servers, but doesn't put the entire thing into context, saving you space. Subagents run in parallel with your main agent but has a complete separate context window. So for tasks that require an answer
- 2:53 – 3:08
Subagents: parallel work with separate context windows
- SPSpeaker
without the journey, like where is the authentication endpoints located, you can have the subagent do the work and return just a summary to your main agent. Managing context within Claude Code is
- 3:08 – 3:30
Wrap-up: practical context management checklist
- SPSpeaker
crucial. Use /compact to summarize long sessions and /clear to start fresh. To use your context window effectively, be specific with what you want. Check what's using your current context window and use subagents to delegate tasks you only need the answer for. [upbeat music]
Episode duration: 3:30
Install uListen for AI-powered chat & search across the full episode — Get Full Transcript
Transcript of episode eW3oTyfeWZ0
