CHAPTERS
- 0:03 – 0:34
What “context” means in Claude Code (and what consumes it)
Defines context as Claude’s working memory and explains that everything Claude sees—files, tool calls, command results, and your messages—accumulates in the context window. Emphasizes that the window is finite, so usage must be managed intentionally.
- •Context window = Claude’s working memory capacity
- •Prompts, file reads, tool calls, and tool results all add to context
- •Finite context makes optimization important
- 0:34 – 1:04
Automatic compaction: freeing space by summarizing history
Explains that when you near the context limit, Claude automatically compacts the session to reclaim space. Compaction summarizes key details and drops unnecessary tool outputs, but it may lose some specifics from earlier conversation.
- •Compaction triggers automatically near the limit
- •Summarizes important details and removes unnecessary tool results
- •Potential tradeoff: loss of fine-grained prior details
- 1:04 – 1:20
Manual controls: /compact vs /clear for different resets
Introduces manual context management commands and when to use them. /compact keeps a summarized memory of work so far, while /clear wipes everything to start completely fresh.
- •/compact summarizes everything up to that point
- •/clear removes all prior context and starts from scratch
- •Choose based on whether you need continuity or a clean slate
- 1:20 – 1:35
Inspecting context usage with /context
Shows how to check the current state of your context window using /context. The command provides a high-level view of total size, which categories consume the most, and a visual breakdown.
- •Run /context to view current context size
- •See which categories are consuming the most space
- •Includes a graphic/breakdown for quick diagnosis
- 1:35 – 1:51
Rule of thumb: when to compact vs when to clear
Provides practical guidance for deciding between compaction and clearing based on your workflow. Compact when continuing the same feature and you’re near the limit; clear when switching to a new feature to avoid bias from previous work.
- •Compact to keep relevant feature context while continuing work
- •Clear when starting a new feature to avoid earlier-conversation bias
- •Keep context aligned to the current development goal
- 1:51 – 2:08
Persistent memory across sessions: use claude.md
Explains how to preserve information you want Claude to remember beyond a single session. Storing key project notes in claude.md prevents Claude from needing to rediscover them later.
- •Put durable, reusable info in claude.md
- •Helps across sessions without re-exploration
- •Reduces repeated context consumption over time
- 2:08 – 2:23
Prompt specificity reduces context waste
Argues that short, vague prompts can backfire by forcing Claude to search the codebase and reason more extensively, consuming additional context. Being explicit up front can reduce tool calls and exploration.
- •Vagueness can increase context usage over time
- •Explicit instructions reduce codebase wandering
- •A sentence or two of clarity can save significant context
- 2:23 – 2:38
Tool overload: MCP servers and context footprint
Notes that MCP servers load their available tools into context by default, which can bloat the context window. Recommends disabling unrelated MCP servers to conserve space.
- •MCP tools are loaded into context by default
- •Many unrelated MCP servers can waste context capacity
- •Turn off unnecessary servers to reduce overhead
- 2:38 – 2:53
Skills as a lighter alternative to MCP servers
Introduces “skills” as a similar capability to MCP servers but with reduced context impact. This can help retain functionality while saving space in the context window.
- •Skills provide MCP-like capability
- •Designed to avoid loading the entire toolset into context
- •Useful for conserving context while retaining utilities
- 2:53 – 3:08
Subagents: parallel work with separate context windows
Explains how subagents operate alongside the main agent with their own independent context. They’re ideal for “answer-only” tasks, returning a summary to the main agent without importing the full investigative trail.
- •Subagents run in parallel with separate context windows
- •Good for tasks where you only need the final answer
- •Main agent receives a summary instead of full exploration history
- 3:08 – 3:30
Wrap-up: practical context management checklist
Recaps the core actions to keep Claude Code effective in long sessions. Reinforces using /compact and /clear appropriately, staying specific, inspecting /context, and delegating with subagents when you only need results.
- •Use /compact for long sessions; /clear for fresh starts
- •Be specific to reduce tool calls and exploration
- •Check /context to monitor usage
- •Use subagents for concise, summary-only delegation
