In short.
This GitHub Copilot CLI guide helps developers cancel operations and undo completed assistant work, but rewinding is irreversible and file restoration has strict limits. It distinguishes Esc from Ctrl+C, explains how to choose a rewind point, and describes conversation-only and conversation-plus-files recovery. Rewind is unavailable in remote-backed or busy sessions. File recovery requires tracking and skips files whose contents differ from Copilot's last write. The described behavior was not executed or independently verified; applicable CLI versions, costs and licensing are unknown.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete selected documentation page at the exact supplied address, including cancellation behavior, rewind procedures, warning and note text, prerequisites, capture limits and verification commands. The linked command reference and all other pages are excluded. Installation, pricing, licensing, release applicability, implementation details and external side-effect recovery are not established. No behavior or command was executed.
The overview
Resource identity
This is a GitHub documentation guide for the interactive Copilot CLI. Its scope is stopping active operations and rewinding completed session work, optionally restoring files.
The source is the complete page at [https://docs.github.com/api/article/body?pathname=/en/copilot/how-tos/copilot-cli/use-copilot-cli/roll-back-changes]. It is a procedural reference, with prerequisites, keyboard behavior, recovery limits and verification commands.
Practical assessment
The guide is useful when a developer needs to interrupt an unwanted operation or return an interactive session to an earlier prompt. Its strongest contribution is distinguishing cancellation, conversation rewind and file restoration: each changes a different part of the session.
File restoration should be treated as selective recovery. A rewind can remove conversation history while leaving some files unchanged because they were edited afterward, exceeded capture limits or were never tracked. The page describes expected behavior; reliability in actual sessions was not assessed.
Who it helps
Beginners using Copilot CLI can use the guide to understand why pressing Esc may cancel work, close a dialog, clear input or open a rewind picker depending on session state.
Experienced developers may find the details about queued prompts, file eligibility and pre-prompt restoration especially useful. Rewind works outside Git repositories, although the suggested Git verification commands require a repository. Users of remote-backed sessions cannot use rewind under the documented rules.
Documented capabilities
Esc provides state-dependent control. During active work, the first press shows a reminder and a second interrupts the operation. A single press denies a pending permission request or closes an open dialog. With no queued prompts, the documented cancellation interval is half a second.
Ctrl+C immediately cancels the active operation and clears queued prompts. A file write already underway completes, while remaining planned changes are abandoned. Pressing Ctrl+C again within two seconds, with the input area empty, exits the session.
When idle, double Esc, /undo and its alias /rewind can open the rewind picker. Users can remove later conversation history alone or also restore eligible files. File restoration includes a per-file preview before you confirm, and afterwards Copilot reports how many files were restored and names any skipped files.
Using it
Requirements
Rewind requires an existing rewind point and a session with no work in progress. It cannot go back before the first prompt and is unavailable in remote-backed sessions. Double Esc opens the picker only when Copilot is idle and the input area is empty.
File restoration also requires a session that tracked file changes. Resuming a session created before tracking was enabled offers conversation rewind only; the guide directs users to start a new session for file restoration.
Installation, authentication, subscription eligibility, supported operating systems and minimum CLI version are not specified.
How cancellation and rewind work
Rewind targets the state immediately before Copilot began processing the selected prompt. Conversation-only recovery leaves files untouched. Conversation-plus-files recovery restores eligible files, removes the discarded conversation and captured changes, preserves earlier rewind points, and returns the selected prompt to the input area for editing or resubmission.
A file is skipped when its current contents no longer match what Copilot last wrote. Later session history is permanently removed, and the rewind itself cannot be undone.
Esc cancellation also depends on session type. With queued prompts, a local session processes them as the next turn after interruption; a remote-backed or attached session does not run them as a follow-up. Outside the idle, empty-input state, double Esc follows this priority: cancel a running shell command, stop the response, stop background agents, then clear input.
Using the guide
In an eligible session, wait for work to finish and clear the input area before pressing Esc twice quickly. Alternatively, use /undo or /rewind. Choose a prompt in the picker, then select conversation-only recovery or conversation-plus-files recovery.
The picker shows the ten most recent points at once, with arrow-key navigation for older points. Entries include prompt text, elapsed time and, for turns that changed files, added and removed line counts. Review the file preview before confirming restoration.
The file-restoration option is unavailable when neither the selected turn nor later turns contain restorable changes. The guide does not cover initial CLI installation or configuration.
Illustrative recovery example
Suppose Copilot changes two tracked, eligible source files and you then manually edit one of them. Once Copilot is idle, use /undo, select the prompt that caused the changes, and inspect the Conversation + files preview.
Under the documented rules, the file that still matches Copilot's last write can be restored to its state before that prompt. The manually edited file is skipped if its contents differ. The discarded conversation history is removed and the selected prompt returns to the input area.
In a Git repository, the guide suggests ! git status to inspect file status, ! git diff to review unstaged changes, and ! git log --oneline -1 to inspect the current commit. This example and these commands were not executed.
Assessment & evidence
Recovery limits
Changes to individual files larger than 10 MB are not captured. If one turn changes more than 500 files, file changes for that entire turn are not captured; other turns remain unaffected.
Restoration covers only files Copilot changed and skips files whose current contents differ from its last write. Sessions without file tracking offer conversation rewind only. Remote-backed sessions and sessions with ongoing work cannot rewind.
Rewinding permanently removes later history. The page does not establish recovery for external services, Git commits or other effects beyond the described file changes. Those recovery cases were not assessed.
What the behavior means for your work
Canceling with Ctrl+C abandons the remaining planned changes but lets a file write already in progress finish; the page does not say whether interrupting with Esc behaves the same way. Either way, canceling does not return files to an earlier state. Rewind is the separate mechanism for recovering completed session work.
The content-matching rule protects later edits but also means conversation and files may end up at different points after recovery. This makes the restoration preview and subsequent file inspection important, especially when you have edited files yourself or made large changes.
Available choices
For stopping active work, Esc offers a confirmation step while Ctrl+C immediately cancels and clears queued prompts. For opening recovery, /undo and /rewind are command alternatives to double Esc; all open the same picker.
Conversation-only rewind suits a change of conversational direction while retaining current files. Conversation-plus-files also attempts eligible file recovery. The Git commands in the guide inspect repository state rather than perform recovery. Other recovery tools and competing assistants are not compared.
Evidence and verification limits
The evidence consists of the complete selected GitHub documentation page, including its warnings, prerequisites, keyboard-state descriptions, recovery limits and Git inspection commands. The linked CLI command reference is outside the available evidence.
The captured source revision is sha256:ed3b0fe2ee4cdc64f7c3edc3cbcb6fbdf3af962153d6c507e7b3ff92465895ae. All behavioral claims here derive from that documentation. No CLI session, cancellation, rewind or verification command was executed, and implementation behavior was not independently assessed.
Access & freshness
Costs
The page provides no prices, subscription requirements, usage allowances or charges for cancellation and rewind. The cost of accessing Copilot CLI is unknown from this evidence.
It also does not establish whether canceling, rewinding or resubmitting work affects billing or usage allowances.
Licensing and reuse
The selected page contains no license or redistribution notice. Permission to reproduce or redistribute the documentation cannot be established from this evidence.
Copilot CLI's software license, service terms and rights concerning generated code are also not specified.
Freshness and version applicability
The source was captured at 2026-11-15T10:10:08.605Z. The supplied page does not state a publication date, last-update date or applicable CLI version.
It refers to older sessions created before file-change tracking was enabled without identifying the release or date when tracking began. Applicability to a particular installed release remains unknown.
Recommended next steps
Decide whether you need to interrupt current work, remove conversation history or restore files. Before rewinding, confirm the session is eligible and review the chosen prompt carefully, because recovery targets the state before that prompt and permanently removes later history.
When restoring files, inspect the per-file preview, the restored-file count and the list of skipped files. In a Git repository, use the documented status, diff and latest-commit commands to inspect the result. Check skipped files separately rather than assuming the rewind restored every change.
