Reference: what survives the context window
Claude Certified Architect - Foundations (CCAR-F) › Domain 5: Context Management & Reliability
What fills and survives the context window, from the Claude Code documentation
Domain 5 examines context degradation and what to do about it. The guide names scratchpads, subagent delegation and compaction. The documentation says precisely what compaction keeps and what it drops, which is the part that decides whether a technique works.
What survives compaction
Compaction replaces the conversation with a structured summary. It is not a uniform loss — specific things come back.
| After compaction | What happens |
|---|---|
| Project-root CLAUDE.md | Re-read from disk and re-injected |
| Files read or edited | Up to five are re-read, most recently modified first |
| Rules and nested CLAUDE.md | Reloaded for those re-read files |
| Skills you invoked | Bodies re-injected, capped at 5,000 tokens per skill |
| The startup skill index | Not re-injected |
| Anything said only in conversation | Gone |
Acting before the automatic pass
Claude Code compacts automatically as the window fills, so a full context does not end a session. You can also act first.
Controlling compaction
Compact with a focus
Run compaction with instructions — for example, focusing on the auth bug fix — before starting a long new task, so the summary keeps what the next task needs.
What is loaded before you type
A session begins with a system prompt, environment information, memory files, and a listing of available MCP tools. Two details matter for Domain 5.
Auto memory loads the first 200 lines or 25KB of the memory index, whichever comes first — content past that is not loaded at session start.
MCP tool schemas are deferred by default: names are listed so Claude knows what exists, and full schemas load on demand. Setting the tool-search option to auto loads them upfront when they fit within 10% of the context window.
Sources
- Explore the context window — https://code.claude.com/docs/en/context-window (retrieved 2026-08-30)