The whole hunk
from line 1582, old and new numbered
/
lines
from line 1582
15821582
15831583The session walks through a realistic flow with representative token counts:
15841584
1585* **Before you type anything**: CLAUDE.md, auto memory, MCP tool names, and skill descriptions all load into context. Your own setup may add more here, like an [output style](/docs/en/output-styles) or text from [`--append-system-prompt`](/docs/en/cli-reference), which both go into the system prompt the same way.
1585* **Before you type anything**: CLAUDE.md, auto memory, MCP tool names, and skill descriptions all load into context. Your own setup may add more here, like an [output style](/docs/en/output-styles) or text from [`--append-system-prompt`](/docs/en/cli-reference).
15861586* **As Claude works**: each file read adds to context, [path-scoped rules](/docs/en/memory#path-specific-rules) load automatically alongside matching files, and a [PostToolUse hook](/docs/en/hooks-guide) fires after each edit.
15871587* **The follow-up prompt**: a [subagent](/docs/en/sub-agents) handles the research in its own separate context window, so the large file reads stay out of yours. Only the summary and a small metadata trailer come back.
15881588* **At the end**: `/compact` replaces the conversation with a structured summary. Most startup content reloads automatically; the table below shows what happens to each mechanism.
from line 1593
15931593
15941594| Mechanism | After compaction |
15951595| :------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------ |
1596| System prompt and output style | Unchanged; not part of message history |
1596| System prompt and output style | Both still apply |
15971597| Project-root CLAUDE.md and unscoped rules | Re-injected from disk |
15981598| Auto memory | Re-injected from disk |
15991599| The plan Claude wrote in [plan mode](/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode) | Re-injected from disk |