Answer: Run /compact in Copilot CLI to summarize the history and shrink the context window, optionally focusing the summary (for example, /compact focus on the auth module). You can also use /context to check current usage at any time. Status: Confirmed Entry: tool/github-copilot/memory-and-context/compact-long-cli-sessions Revision: 3 Digest: sha256:f54189b79e69e768 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:34:29Z Last changed: 2026-11-18T13:13:40Z (usage check command: — → /context) Last verified: 2026-11-20T13:16:55Z Next check: 2026-11-21T13:16:55Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of command | /compact | [1] | 2026-11-20 optional focus example | /compact focus on the auth module | [1] | 2026-11-20 usage check command | /context | [1] | 2026-11-20 Sources: [1] GitHub. "Optimizing your AI usage to maximize efficiency and reduce cost - GitHub Docs". https://docs.github.com/en/copilot/tutorials/optimize-ai-usage Role: primary. Accessed: 2026-11-20T13:16:55Z Quote: "run /compact in Copilot CLI to summarize the history and shrink the context window" (Supports: command) Quote: "optionally focusing the summary (for example, /compact focus on the auth module )" (Supports: optional focus example) Quote: "you can use /context to check current usage at any time" (Supports: usage check command) Snapshot SHA-256: 3a60d56b453981111d1fa07cc50cc3ba4cf8c9e89a0816ac0fce333132c39bcd (captured 2026-11-18T13:13:39Z) 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-18T13:13:40Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:16:55Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:16:55Z Last attempt: 2026-11-20T13:16:55Z Notes and limitations: Extracted automatically from a single official source (section "Compact long Copilot CLI sessions that you want to continue"). Related: https://latestn.com/tool/github-copilot/memory-and-context/compaction-behavior What does compaction do in GitHub Copilot and when does it happen? 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/attach-repository-in-chat How do I attach a repository in GitHub Copilot Chat to give it repository context? 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/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:13:40Z | changed | usage check command: — → /context | [1] 2026-11-18T13:13:40Z | changed | optional focus example: — → /compact focus on the auth module | [1] 2026-11-18T13:13:40Z | changed | command: — → /compact | [1] 2026-11-18T13:13:40Z | changed | Usage check command: /context → — | [1] 2026-11-18T13:13:40Z | changed | Optional focus example: /compact focus on the auth module → — | [1] 2026-11-18T13:13:40Z | changed | Command: /compact → — | [1] 2026-11-16T13:01:33Z | changed | Usage check command: — → /context | [1] 2026-11-16T13:01:33Z | changed | Optional focus example: — → /compact focus on the auth module | [1] 2026-11-16T13:01:33Z | changed | Command: — → /compact | [1] 2026-11-16T13:01:33Z | changed | usage check command: /context → — | [1] 2026-11-16T13:01:33Z | changed | optional focus example: /compact focus on the auth module → — | [1] 2026-11-16T13:01:33Z | changed | command: /compact → — | [1] 2026-11-13T03:34:29Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/memory-and-context/compact-long-cli-sessions/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/compact-long-cli-sessions POST: https://latestn.com/dispute/tool/github-copilot/memory-and-context/compact-long-cli-sessions with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/memory-and-context/compact-long-cli-sessions?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I compact long GitHub Copilot CLI sessions that I want to continue? Revision 3, last verified 2026-11-20T13:16:55Z. https://latestn.com/tool/github-copilot/memory-and-context/compact-long-cli-sessions (accessed 2026-11-21T09:53:33Z). @misc{LatestN_tool_github_copilot_memory_and_context_compact_long_cli_sessions_r3, title = {How do I compact long GitHub Copilot CLI sessions that I want to continue?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/memory-and-context/compact-long-cli-sessions}}, note = {Revision 3; digest sha256:f54189b79e69e768; last verified 2026-11-20T13:16:55Z; accessed 2026-11-21T09:53:33Z} } 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/compact-long-cli-sessions