- Understand what the context window is and what fills it (and costs you money).
- Make Claude Code "remember" your project between sessions with CLAUDE.md.
- Use /clear, /compact, and subagents to stretch your limits.
- Decide which tasks to send to a cheap model or your local AI.
What Context Is (and Why It Gets Spent)
What fills context the most, in order:
- Large files read in full (or pasted by you into the chat).
- Long command output (logs, tests, listings).
- Endless conversations that mix different tasks.
Your Three Savings Buttons
/clear # clears the conversation and starts fresh (end of task) /compact # summarizes the conversation and frees space (mid-task) /cost # check how much you've used in the session
/compact is the middle ground: it compresses what you've discussed into a summary and lets you continue where you left off. Use it when the task is long but you don't want to lose the thread. And don't fear /clear: it doesn't delete your code or files, only the conversation.
The Cure for "Starting from Scratch": CLAUDE.md
The frustration of re-explaining your project every session has an official fix: a CLAUDE.md file in the project root. Claude Code reads it automatically on startup. Ask for it like this:
Create a CLAUDE.md for this project: what it is, how to start it, what structure it has, my conventions, and what you must NOT touch. Keep it brief and useful so it serves as memory between sessions.
Subagents: Explore Without Cluttering
When Claude needs to dig through a large repository, every file it reads stays in your context… unless it delegates. Subagents explore in their own memory and return only the conclusion. Ask for it explicitly:
Use a subagent to investigate where login is handled in this project, and bring me only the summary with the key files.
Each Task Deserves the Model It Needs
Not every task needs the most powerful model:
- Mechanical tasks (renaming, formatting, summarizing): a fast/cheap model is enough—switch with /model.
- Designing, hard debugging, refactoring: the powerful model—that's what it's for.
- Volume and private data (processing a hundred PDFs, chatting with documents): no cloud, no limits—your local AI. How to connect it is covered in the lesson "Connect Claude Code with Your Local AI" in the Local AI course.
- CLAUDE.md when starting each project (and updated when you make an important decision).
- /clear when switching tasks; /compact on long tasks.
- Subagents for exploring; limit which files it should read.
- Fast model for mechanical work; local AI for volume and private data.
Challenge to Practice
Take your most active project and write its CLAUDE.md today (with help from Claude Code). Tomorrow, time how long it takes to pick the work back up. That minute that used to be ten is the best metric for this lesson.