Checkpoints & Editing Previous Messages

Checkpoints & Editing Previous Messages

Checkpoints

Chat checkpoints give you a safety net when using GitHub Copilot. Whenever Copilot makes changes across multiple files, VS Code can automatically create a snapshot of your workspace. If the results aren’t what you expected, or you simply want to explore a different approach, you can roll everything back to a previous point in time.

To use checkpoints, enable them in your settings with:

  • chat.checkpoints.enabled: true

Once enabled, Copilot will capture these restore points during chat interactions, letting you quickly return to a known good state without having to manually undo file after file. It’s a simple way to experiment confidently, knowing you can always rewind if needed.

✏️ Demo

Open up a TypeScript file and ask Copilot to generate an add function that adds two numbers together.

 

Now ask Copilot to modify the function to add three numbers.

Once this change is made you’ll find that a checkpoint has been created. Click on the Restore Checkpoint button and your code will be automatically reverted back to the function with 2 numbers.

Editing Previous Messages

Editing a previous message lets you refine or fix your original prompt without starting a brand-new conversation. Copilot will remove the old request, undo any edits that came after it, and then run your updated prompt as if it were new.

  • Pick a past request in the chat.

  • Edit the text.

  • Copilot clears everything that happened after that request.

  • Your new version is added to the chat and executed.

https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode#_edit-a-previous-chat-request-experimental

✏️ Demo

Open up a TypeScript file and ask Copilot to generate an add function that adds two numbers together.

Now click on the message and update it to a subtract function.

You’ll notice that the add function disappears and is replaced by subtract. Copilot automatically keeps track of what needs to change and reconciles everything correctly.