Answer: Compaction lets Copilot support long-running sessions without hitting the limits of the context window by compressing the conversation history into a smaller summary. In the Copilot CLI, it happens automatically when your conversation reaches approximately 80% of the context window's capacity, and it can also be triggered manually with /compact. Status: Confirmed Entry: tool/github-copilot/memory-and-context/compaction-behavior Revision: 3 Digest: sha256:dd4fd1f692066044 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:21:12Z Last changed: 2026-11-19T12:51:30Z (result: the conversation history is compressed into a much smaller summary → —) Last verified: 2026-11-20T12:57:34Z Next check: 2026-11-21T12:57:34Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of purpose | allows Copilot to support long-running sessions without hitting the limits of the context window | | [1] | 2026-11-20 automatic threshold (Copilot CLI) | approximately 80% | of the context window's capacity | [1] | 2026-11-20 buffer | approximately 20% | | [1] | 2026-11-20 pause threshold | approximately 95% | | [1] | 2026-11-20 manual trigger | /compact | | [1] | 2026-11-20 Sources: [1] GitHub. "Managing context for GitHub Copilot - GitHub Docs". https://docs.github.com/en/copilot/concepts/prompting-and-context/context-management Role: primary. Accessed: 2026-11-20T12:57:34Z Quote: "Compaction is the process that allows Copilot to support long-running sessions without hitting the limits of the context window." (Supports: purpose) Quote: "when your conversation reaches approximately 80% of the context window's capacity, Copilot CLI automatically starts compacting the context in the background" (Supports: automatic threshold (Copilot CLI)) Quote: "This leaves a buffer of approximately 20% so that tool calls can continue to run while compaction is in progress." (Supports: buffer) Quote: "If the context fills to approximately 95% before compaction finishes, Copilot CLI pauses briefly to wait for compaction to complete before continuing." (Supports: pause threshold) Quote: "you can trigger compaction manually at any time by entering the /compact command" (Supports: manual trigger) Snapshot SHA-256: b506b6fa2724a4261ba3d602ef102f592c37a229eeb72c230257d589d3425776 (captured 2026-11-18T12:51:16Z) 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-18T12:51:17Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:57:34Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:57:34Z Last attempt: 2026-11-20T12:57:34Z Notes and limitations: Extracted automatically from a single official source (section "Compaction"). Related: https://latestn.com/tool/github-copilot/memory-and-context/context-info-breakdown How do I get an on-demand context breakdown with session.metadata.contextInfo in the GitHub Copilot SDK? https://latestn.com/tool/github-copilot/memory-and-context/continue-vs-new-conversation When should I continue a GitHub Copilot Chat conversation versus start a new one? https://latestn.com/tool/github-copilot/memory-and-context/copilot-spaces-test-suggestions How can I use GitHub Copilot Spaces to improve test suggestions? https://latestn.com/tool/github-copilot/memory-and-context/check-context-usage How do I check my context usage in GitHub Copilot? https://latestn.com/tool/github-copilot/memory-and-context/choose-repos-files-as-context How do I choose repositories or files as context in GitHub Copilot Spaces? https://latestn.com/tool/github-copilot/memory-and-context/compact-long-cli-sessions How do I compact long GitHub Copilot CLI sessions that I want to continue? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T12:51:30Z | changed | result: the conversation history is compressed into a much smaller summary → — | [1] 2026-11-19T12:51:30Z | changed | purpose: support long-running sessions without hitting the limits of the context window → allows Copilot to support long-running sessions without hitting the limits of the context window | [1] 2026-11-17T13:12:23Z | changed | result: the conversation history is compressed into a much smaller summary, freeing up the majority of the context window for new work → the conversation history is compressed into a much smaller summary | [1] 2026-11-17T13:12:23Z | changed | purpose: allows Copilot to support long-running sessions without hitting the limits of the context window → support long-running sessions without hitting the limits of the context window | [1] 2026-11-13T03:21:12Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/memory-and-context/compaction-behavior/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/github-copilot/memory-and-context/compaction-behavior POST: https://latestn.com/dispute/tool/github-copilot/memory-and-context/compaction-behavior with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/memory-and-context/compaction-behavior?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What does compaction do in GitHub Copilot and when does it happen? Revision 3, last verified 2026-11-20T12:57:34Z. https://latestn.com/tool/github-copilot/memory-and-context/compaction-behavior (accessed 2026-11-21T09:52:23Z). @misc{LatestN_tool_github_copilot_memory_and_context_compaction_behavior_r3, title = {What does compaction do in GitHub Copilot and when does it happen?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/memory-and-context/compaction-behavior}}, note = {Revision 3; digest sha256:dd4fd1f692066044; last verified 2026-11-20T12:57:34Z; accessed 2026-11-21T09:52:23Z} } 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/github-copilot/memory-and-context/compaction-behavior