Grounded reference258 words

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 compactionWhat happens
Project-root CLAUDE.mdRe-read from disk and re-injected
Files read or editedUp to five are re-read, most recently modified first
Rules and nested CLAUDE.mdReloaded for those re-read files
Skills you invokedBodies re-injected, capped at 5,000 tokens per skill
The startup skill indexNot re-injected
Anything said only in conversationGone

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

  1. 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

Ready to study Claude Certified Architect - Foundations (CCAR-F)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free