Answer: When the context window fills up, Claude Code compacts the conversation into a summary, keeping your requests and key code snippets but potentially losing detailed instructions from early in the conversation. If a single file or tool output is so large that context refills immediately after each summary, Claude Code stops auto-compacting after a few attempts and shows an error instead of looping. Status: Confirmed Entry: tool/claude-code/memory-and-context/context-window-full Revision: 3 Digest: sha256:1752db59b6603118 (changes whenever the content changes) Timeline: Created: 2026-11-13T02:28:00Z Last changed: 2026-11-18T12:16:53Z (compact command: — → /compact) Last verified: 2026-11-20T12:21:27Z Next check: 2026-11-21T12:21:27Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of action on context fill | compacts the conversation into a summary | [1] | 2026-11-20 what summary keeps | keeps your requests and key code snippets | [1] | 2026-11-20 thrashing behavior | stops auto-compacting after a few attempts | [1] | 2026-11-20 context command | /context | [1] | 2026-11-20 compact command | /compact | [1] | 2026-11-20 Sources: [1] Anthropic. "How Claude Code works". https://code.claude.com/docs/en/how-claude-code-works.md Role: primary. Accessed: 2026-11-20T12:21:27Z Quote: "It compacts the conversation into a summary." (Supports: action on context fill) Quote: "The summary keeps your requests and key code snippets, but detailed instructions from early in the conversation may be lost." (Supports: what summary keeps) Quote: "Claude Code stops auto-compacting after a few attempts and shows an error instead of looping." (Supports: thrashing behavior) Quote: "Run `/context` to see what's using space." (Supports: context command) Quote: "run `/compact` with a focus (like `/compact focus on the API changes`)" (Supports: compact command) Published: 2026-11-20T02:54:35Z Snapshot SHA-256: 8ee7e5187e0bd8b215322665628b34751189339e58e1b27bf84fc17fd31242f6 (captured 2026-11-17T12:26:38Z) 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:26:40Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:21:27Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:21:27Z Last attempt: 2026-11-20T12:21:27Z Notes and limitations: Extracted automatically from a single official source (section "When context fills up"). Related: https://latestn.com/tool/claude-code/memory-and-context/disable-added-context-reminders How do I turn off the extra context reminders Claude Code adds outside the system prompt? https://latestn.com/tool/claude-code/memory-and-context/enable-disable-auto-memory How do I enable or disable auto memory in Claude Code? https://latestn.com/tool/claude-code/memory-and-context/exclude-irrelevant-claude-md-files How do I exclude irrelevant CLAUDE.md files in Claude Code? https://latestn.com/tool/claude-code/memory-and-context/choose-instruction-files How do I choose which CLAUDE.md or AGENTS.md instruction files Claude Code loads? https://latestn.com/tool/claude-code/memory-and-context/claude-md-load-locations-sdk Where does the Claude Code SDK load CLAUDE.md files from? https://latestn.com/tool/claude-code/memory-and-context/context-window-and-compaction What consumes context in the Claude Code agent loop and how does automatic compaction work? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:16:53Z | changed | compact command: — → /compact | [1] 2026-11-18T12:16:53Z | changed | action on context fill: — → compacts the conversation into a summary | [1] 2026-11-18T12:16:53Z | changed | action on fill: compacts the conversation into a summary → — | [1] 2026-11-13T12:11:05Z | changed | thrashing behavior: stops auto-compacting after a few attempts and shows an error instead of looping → stops auto-compacting after a few attempts | [1] 2026-11-13T12:11:05Z | changed | what may be lost: detailed instructions from early in the conversation may be lost → — | [1] 2026-11-13T12:11:05Z | changed | action on fill: It compacts the conversation into a summary → compacts the conversation into a summary | [1] 2026-11-13T02:28:00Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/memory-and-context/context-window-full/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/context-window-full POST: https://latestn.com/dispute/tool/claude-code/memory-and-context/context-window-full with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/memory-and-context/context-window-full?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What happens when the Claude Code context window fills up? Revision 3, last verified 2026-11-20T12:21:27Z. https://latestn.com/tool/claude-code/memory-and-context/context-window-full (accessed 2026-11-21T09:53:59Z). @misc{LatestN_tool_claude_code_memory_and_context_context_window_full_r3, title = {What happens when the Claude Code context window fills up?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/memory-and-context/context-window-full}}, note = {Revision 3; digest sha256:1752db59b6603118; last verified 2026-11-20T12:21:27Z; accessed 2026-11-21T09:53:59Z} } 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/context-window-full