Answer: To permanently delete a session and all its data from disk, use deleteSession, which is irreversible. To clean up old sessions, list sessions and call deleteSession on those older than a chosen max age, for example sessions older than 24 hours. Status: Confirmed Entry: tool/github-copilot/features/manage-session-lifecycle Revision: 3 Digest: sha256:e798764bf0bdb33b (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:15Z Last changed: 2026-11-19T13:02:14Z (deleteSession behavior: — → deleteSession() permanently removes everything, including files on disk.) Last verified: 2026-11-20T13:08:37Z Next check: 2026-11-21T13:08:37Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of deletion method | deleteSession | | [1] | 2026-11-20 cleanup example age | 24 * 60 * 60 * 1000 | milliseconds | [1] | 2026-11-20 disconnect behavior | disconnect() releases in-memory resources but keeps session data on disk for later resumption. | | [1] | 2026-11-20 deleteSession behavior | deleteSession() permanently removes everything, including files on disk. | | [1] | 2026-11-20 Sources: [1] GitHub. "Session resume and persistence - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/features/session-persistence Role: primary. Accessed: 2026-11-20T13:08:37Z Quote: "To permanently remove a session and all its data from disk (conversation history, planning state, artifacts), use deleteSession ." (Supports: deletion method) Quote: "// Clean up sessions older than 24 hours await cleanupExpiredSessions ( 24 * 60 * 60 * 1000 );" (Supports: cleanup example age) Quote: "disconnect() releases in-memory resources but keeps session data on disk for later resumption." (Supports: disconnect behavior) Quote: "deleteSession() permanently removes everything, including files on disk." (Supports: deleteSession behavior) Snapshot SHA-256: 513f8a1f776bc9cb40e536d2f92034a38dcc89fe267e521134a23dfc5d699688 (captured 2026-11-18T13:03:45Z) 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:03:45Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:08:37Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:08:37Z Last attempt: 2026-11-20T13:08:37Z Notes and limitations: Extracted automatically from a single official source (section "Managing session lifecycle"). Related: https://latestn.com/tool/github-copilot/features/marketplace-catalog-contents What does the GitHub Copilot marketplace catalog contain? https://latestn.com/tool/github-copilot/features/mcp-best-practices What are the best practices for using MCP with GitHub Copilot agent mode? https://latestn.com/tool/github-copilot/features/mock-objects-example-prompt What example prompt can I give GitHub Copilot to generate mock objects? https://latestn.com/tool/github-copilot/features/lsp-server-benefits What are the benefits of using LSP servers with GitHub Copilot CLI? https://latestn.com/tool/github-copilot/features/lsp-server-capabilities What can GitHub Copilot CLI do with LSP servers? https://latestn.com/tool/github-copilot/features/maintain-plugin-marketplace How do I review and maintain a GitHub Copilot plugin marketplace? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:02:14Z | changed | deleteSession behavior: — → deleteSession() permanently removes everything, including files on disk. | [1] 2026-11-19T13:02:14Z | changed | deprecated method: destroy() → — | [1] 2026-11-19T13:02:14Z | changed | disconnect behavior: disconnect() releases in-memory resources but keeps session data on disk for later resumption → disconnect() releases in-memory resources but keeps session data on disk for later resumption. | [1] 2026-11-19T13:02:14Z | changed | irreversibility: This is irreversible—the session cannot be resumed after deletion → — | [1] 2026-11-17T13:26:39Z | changed | deprecated method: — → destroy() | [1] 2026-11-17T13:26:39Z | changed | disconnect behavior: — → disconnect() releases in-memory resources but keeps session data on disk for later resumption | [1] 2026-11-17T13:26:39Z | changed | cleanup example age: — → 24 * 60 * 60 * 1000 | [1] 2026-11-17T13:26:39Z | changed | irreversibility: — → This is irreversible—the session cannot be resumed after deletion | [1] 2026-11-17T13:26:39Z | changed | deletion method: — → deleteSession | [1] 2026-11-17T13:26:39Z | changed | Deprecated method: destroy() → — | [1] 2026-11-17T13:26:39Z | changed | Disconnect behavior: disconnect() releases in-memory resources but keeps session data on disk for later resumption → — | [1] 2026-11-17T13:26:39Z | changed | Cleanup comment: Clean up sessions older than 24 hours → — | [1] 2026-11-17T13:26:39Z | changed | Cleanup example age: 24 * 60 * 60 * 1000 → — | [1] 2026-11-17T13:26:39Z | changed | Irreversibility: This is irreversible—the session cannot be resumed after deletion → — | [1] 2026-11-17T13:26:39Z | changed | Deletion method: deleteSession → — | [1] 2026-11-13T03:28:15Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/features/manage-session-lifecycle/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/features/manage-session-lifecycle POST: https://latestn.com/dispute/tool/github-copilot/features/manage-session-lifecycle with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/features/manage-session-lifecycle?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I delete or clean up old GitHub Copilot SDK sessions? Revision 3, last verified 2026-11-20T13:08:37Z. https://latestn.com/tool/github-copilot/features/manage-session-lifecycle (accessed 2026-11-21T09:52:33Z). @misc{LatestN_tool_github_copilot_features_manage_session_lifecycle_r3, title = {How do I delete or clean up old GitHub Copilot SDK sessions?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/features/manage-session-lifecycle}}, note = {Revision 3; digest sha256:e798764bf0bdb33b; last verified 2026-11-20T13:08:37Z; accessed 2026-11-21T09:52: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/features/manage-session-lifecycle