PUBLIC BETA OFFER

Save 50% off on an Eligible Learning PlanValid for 1-month plan, 3-month plan, 12-month plan · Code LPXBETA50 · Ends Dec 6, 2026

GH-700: Recover Copilot Work with Checkpoints and Session History

Choose a client-specific Copilot recovery action for lost context, unwanted file edits or discarded turns, and check what remains outside its scope.

Guide

Content version 1.0

GH-700: Recover Copilot Work with Checkpoints and Session History

GH-700: Recover Copilot Work with Checkpoints and Session History

To recover Copilot work, first identify what is wrong: the context being used, the conversation path, or the files. Compaction summarizes context; it does not restore files. In supported Visual Studio Code sessions, Restore Checkpoint restores affected workspace files and removes later turns. GitHub Copilot CLI rewind offers conversation-only or conversation-and-files recovery, with irreversible removal of later turns. A fork preserves a separate conversation path.

Choose the action in the actual client and inspect its scope before confirming. A file or history recovery action is not a deployment rollback: completed terminal commands, network requests and external-service changes need separate verification and recovery. The client behavior below reflects official documentation checked on November 14, 2026, rather than a guarantee for every installed release or session type.

Diagnose the state you need to recover

Use the following questions as an editorial troubleshooting method before changing anything:

  1. What was the last acceptable outcome? Identify the request, expected file content and business decision separately. An earlier conversation can describe a correct decision while the current files contain useful later work.
  2. What must be preserved? Record valuable edits, original instructions and evidence needed to explain the failure. Do this before an action that removes history or replaces files.
  3. Where did work happen? Identify the client, session, folder or worktree, and any external resources involved. Avoid restoring a similarly named session in a different workspace.
  4. Which state actually needs changing? If only a decision was forgotten, investigate context. If the files are wrong, inspect their differences. If you want an alternative discussion, consider a fork.

Do not use repeated recovery attempts as a substitute for understanding the affected scope. When live work still needs containment, use the separate supervision procedure in GH-700: Steer and Stop Agent Runs Without Assuming Rollback before attempting file-state recovery.

Recover context after compaction

In GitHub Copilot CLI and the GitHub Copilot app, /compact summarizes earlier conversation to free context space. Summarization can lose exact wording, detailed command output and minor decisions; a completed compaction cannot be reversed. Running it again will not reconstruct missing evidence.

In Copilot CLI, enter /session followed by the checkpoints subcommand to list saved compaction summaries. Add a listed checkpoint number to read that summary. These records help diagnose what survived summarization; they are not interchangeable with a file restore point.

If a requirement is missing, the recommended repair is to locate the authoritative requirement or retained evidence and provide it again, explicitly identifying the correction. Ask Copilot to restate the intended next step before continuing. Treat a summary as a continuity aid rather than the authoritative record of every prior detail.

Restore affected files in supported VS Code sessions

Visual Studio Code creates checkpoints before requests in supported chat sessions; the setting chat.checkpoints.enabled controls them. To use one, find the earlier request, hover over it, select Restore Checkpoint, and confirm after reviewing what will be removed. Restoration returns affected workspace files to the checkpoint and removes subsequent requests from conversation history.

This has a broader effect than rejecting a single unwanted edit. Before confirming, decide whether useful later work needs preserving. If the control is unavailable, verify support and configuration for that session instead of assuming a checkpoint exists.

VS Code checkpoint restoration does not reverse completed terminal commands, network requests, deployments or external-service effects. A restored local document cannot establish that an issue update or remote operation was undone.

Choose the Copilot CLI rewind scope deliberately

In GitHub Copilot CLI, /undo or /rewind opens a picker for an earlier user turn:

  • Conversation only rolls back the discussion while leaving files unchanged.
  • Conversation + files also restores files Copilot changed in the selected turn and later discarded turns to their pre-change contents, skipping files you have edited yourself since then.

The CLI tracks those file changes across editing tools, shell commands and subagents; Git is not required. Restoring a tracked file written by a shell command must not be interpreted as reversing that command's other effects.

A CLI rewind cannot be undone: later turns are removed. Use /fork first if you need a copy of the conversation. After rewinding, inspect actual files, especially any manually edited files that were skipped. A shorter transcript is insufficient evidence of the intended file state.

Use a fork to preserve an alternative discussion

In VS Code, /fork copies the full conversation; Fork Conversation on an earlier request copies the discussion through that point. A Copilot worktree session's fork uses the original worktree, so the two conversations can affect the same files. Preserve a discussion and isolate file changes as separate decisions.

In the GitHub Copilot app, /fork requires an active session and forks at the latest turn. The app's slash-command picker reflects the currently available commands. Do not assume it provides the same earlier-request action or rewind options as another client.

Constrained example: recover a business report without repeating an effect

This is an illustrative reasoning exercise, not an executed recovery. Assume a report session has three turns: an accepted outline, an unwanted rewrite, and a later wording correction worth keeping. Also assume a tool already updated an external issue.

The recovery target should name two outcomes: restore the accepted report structure and preserve the useful correction. First retain the correction and record the issue identifier and observed update. In a supported VS Code session, restoring the checkpoint before the rewrite would also remove later requests, so plan to reapply the retained correction deliberately. In CLI, choose between preserving current files and restoring tracked changes; check the manual-edit exception before deciding.

After recovery, compare the report against the outline, confirm the correction is present, and inspect the external issue independently. If the issue update needs reversal, assign that to its authorized owner and service-specific procedure. Do not replay the whole task while assuming its external effects disappeared.

Verify recovery before continuing

As a recommended acceptance check, record the selected recovery point, the resulting conversation boundary, the file differences you inspected and any unresolved external effects. Reintroduce the current requirements and permitted next action explicitly. Continue only when the observed files and remaining obligations match that intention; otherwise preserve the evidence and investigate the mismatch.

Authoritative Sources

8 views