Answer: After compaction, the system prompt and output style both still apply, and project-root CLAUDE.md, unscoped rules, auto memory, and the plan Claude wrote in plan mode are re-injected from disk. Skill descriptions are rebuilt and re-injected, and Claude Code re-reads up to five recently modified files. Status: Confirmed Entry: tool/claude-code/memory-and-context/what-survives-compaction Revision: 2 Digest: sha256:a58ec0d97c4c84e3 (changes whenever the content changes) Timeline: Created: 2026-11-13T02:27:57Z Last changed: 2026-11-18T12:15:22Z (file size threshold for path reference: — → 5,000 tokens) Last verified: 2026-11-20T12:19:46Z Next check: 2026-11-21T12:19:46Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of system prompt and output style | Both still apply | | [1] | 2026-11-20 project-root CLAUDE.md and unscoped rules | Re-injected from disk | | [1] | 2026-11-20 auto memory | Re-injected from disk | | [1] | 2026-11-20 skill descriptions version requirement | v2.1.304 | | [1] | 2026-11-20 files re-read count | up to five | | [1] | 2026-11-20 invoked skill bodies cap per skill | 5,000 tokens | tokens | [1] | 2026-11-20 invoked skill bodies total cap | 25,000 tokens | tokens | [1] | 2026-11-20 file size threshold for path reference | 5,000 tokens | tokens | [1] | 2026-11-20 Sources: [1] Anthropic. "Explore the context window". https://code.claude.com/docs/en/context-window.md Role: primary. Accessed: 2026-11-20T12:19:46Z Quote: "System prompt and output style | Both still apply" (Supports: system prompt and output style) Quote: "Project-root CLAUDE.md and unscoped rules | Re-injected from disk" (Supports: project-root CLAUDE.md and unscoped rules) Quote: "Auto memory | Re-injected from disk" (Supports: auto memory) Quote: "Requires Claude Code v2.1.304 or later" (Supports: skill descriptions version requirement) Quote: "Claude Code re-reads up to five, most recently modified first" (Supports: files re-read count) Quote: "capped at 5,000 tokens per skill and 25,000 tokens total" (Supports: invoked skill bodies cap per skill, invoked skill bodies total cap) Quote: "A file over 5,000 tokens comes back as a path reference without its content" (Supports: file size threshold for path reference) Published: 2026-11-20T02:52:42Z Snapshot SHA-256: c61686187b588e4674948088d4589e6fcd0b2428050344260244d8b1c908eeb7 (captured 2026-11-17T12:24:40Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T12:24:40Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:19:46Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:19:46Z Last attempt: 2026-11-20T12:19:46Z Notes and limitations: Extracted automatically from a single official source (section "What survives compaction"). Related: https://latestn.com/tool/claude-code/memory-and-context/when-context-fills-up When does Claude Code's context window fill up and trigger compaction? https://latestn.com/tool/claude-code/models/add-gateway-models How do I add gateway models to the Claude Code model picker? https://latestn.com/tool/claude-code/models/adjust-effort-level How do I adjust the effort level in Claude Code? https://latestn.com/tool/claude-code/memory-and-context/what-is-claude-md What is CLAUDE.md in Claude Code? https://latestn.com/tool/claude-code/memory-and-context/what-is-compaction What is compaction in Claude Code? https://latestn.com/tool/claude-code/memory-and-context/what-loads-before-typing What loads into Claude Code's context window before I type anything? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:15:22Z | changed | file size threshold for path reference: — → 5,000 tokens | [1] 2026-11-18T12:15:22Z | changed | files re-read count: — → up to five | [1] 2026-11-18T12:15:22Z | changed | large file threshold: 5,000 tokens → — | [1] 2026-11-18T12:15:22Z | changed | files re-read after compaction: up to five → — | [1] 2026-11-13T02:27:57Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/memory-and-context/what-survives-compaction/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/memory-and-context/what-survives-compaction POST: https://latestn.com/dispute/tool/claude-code/memory-and-context/what-survives-compaction with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/memory-and-context/what-survives-compaction?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What survives compaction in Claude Code's context window? Revision 2, last verified 2026-11-20T12:19:46Z. https://latestn.com/tool/claude-code/memory-and-context/what-survives-compaction (accessed 2026-11-21T09:57:11Z). @misc{LatestN_tool_claude_code_memory_and_context_what_survives_compaction_r2, title = {What survives compaction in Claude Code's context window?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/memory-and-context/what-survives-compaction}}, note = {Revision 2; digest sha256:a58ec0d97c4c84e3; last verified 2026-11-20T12:19:46Z; accessed 2026-11-21T09:57:11Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/memory-and-context/what-survives-compaction