Vibe Coder · Unit 8: Building With Claude Code · Lesson 13 of 15
Managing context
Engineers: the context window fills as you work. When to clear, when to compact, and how to hand work between sessions.
Read the short notes and pictures.Do everything inside a blue frame.
Working within the window
You learned in Unit 2 that a model only knows what is in its context. In Claude Code the context fills with file contents, command output and conversation. Managing it is a core skill for long sessions.

Tools you have
Clear
Start the conversation again with an empty context. Use between unrelated tasks.
Compact
Replace the history with a summary. Use in the middle of a long task.
Subagents
Hand a search or a side task to a separate context, and get back only the result.
Notes in files
Ask for a progress note in a file, so a new session can pick up from it.

Habits
One task per session
Clear when you switch.
Point at files
Instead of letting it read the whole repository.
Keep outputs short
Ask for failing tests only, not the full log.
Write the handover
Before stopping, ask for a note of what is done and what is next.
Run a long task cleanly
Take a feature that needs several steps. Keep a PROGRESS.md note updated by Claude Code, compact once in the middle, and finish the feature in a second session started from the note alone.
Done when
Use the same note pattern for every multi-day feature.
Keep these
- Context fills as you work.
- Clear between tasks, compact within them.
- Write handover notes to files.