Answer: Claude Code compacts automatically as you approach the limit, and the exact point where automatic compaction runs depends on your model and configuration. You can also set how full the context window gets before the automatic pass runs with `/autocompact` and a token count, like `/autocompact 500k`. Status: Confirmed Entry: tool/claude-code/memory-and-context/when-context-fills-up Revision: 3 Digest: sha256:ed09cb4ac2ec0500 (changes whenever the content changes) Timeline: Created: 2026-11-13T02:27:58Z Last changed: 2026-11-18T12:15:25Z (extended context window: 1 million token context window → —) Last verified: 2026-11-20T12:19:49Z Next check: 2026-11-21T12:19:49Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of compaction trigger | as you approach the limit | [1] | 2026-11-20 autocompact example | /autocompact 500k | [1] | 2026-11-20 threshold dependency | depends on your model and configuration | [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:49Z Quote: "Claude Code compacts automatically as you approach the limit" (Supports: compaction trigger) Quote: "like `/autocompact 500k`, to set how full the context window gets before the automatic pass runs" (Supports: autocompact example) Quote: "The point where automatic compaction runs depends on your model and configuration." (Supports: threshold dependency) 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:43Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:19:49Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:19:49Z Last attempt: 2026-11-20T12:19:49Z Notes and limitations: Extracted automatically from a single official source (section "When your context fills up"). Related: 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/models/auto-mode-classifier-model How do I choose or change the classifier model used by auto mode 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/claude-code/memory-and-context/what-survives-compaction What survives compaction in Claude Code's context window? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:15:25Z | changed | extended context window: 1 million token context window → — | [1] 2026-11-13T03:03:51Z | changed | extended context window: — → 1 million token context window | [1] 2026-11-13T03:03:51Z | changed | threshold dependency: — → depends on your model and configuration | [1] 2026-11-13T03:03:51Z | changed | what determines threshold: depends on your model and configuration → — | [1] 2026-11-13T02:27:58Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/memory-and-context/when-context-fills-up/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/when-context-fills-up POST: https://latestn.com/dispute/tool/claude-code/memory-and-context/when-context-fills-up with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/memory-and-context/when-context-fills-up?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). When does Claude Code's context window fill up and trigger compaction? Revision 3, last verified 2026-11-20T12:19:49Z. https://latestn.com/tool/claude-code/memory-and-context/when-context-fills-up (accessed 2026-11-21T09:58:12Z). @misc{LatestN_tool_claude_code_memory_and_context_when_context_fills_up_r3, title = {When does Claude Code's context window fill up and trigger compaction?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/memory-and-context/when-context-fills-up}}, note = {Revision 3; digest sha256:ed09cb4ac2ec0500; last verified 2026-11-20T12:19:49Z; accessed 2026-11-21T09:58:12Z} } 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/when-context-fills-up