Study FAQ
What happens when I archive or delete a Copilot session in VS Code?
Also asked as 2
- How do VS Code Archive, Mark as Done and Delete affect Copilot sessions and worktrees?
- Can archiving or deleting a VS Code Copilot session remove its working files?
Answer
Archiving a supported VS Code Copilot session, or marking it done in the Agents window, retains its conversation while removing it from the active list. Deletion is permanent and can also remove associated worktrees or containers. Check the session's resource effects and preserve needed work before either operation.
For a worktree session, archiving commits uncommitted changes to its session branch before removing the worktree folder. If changes cannot be preserved or the folder cannot be removed, the worktree remains. The branch and commits are retained, and restoring the session re-creates the worktree.
To return to archived work, select the Archived or Done filter, then choose Unarchive or Restore before continuing. Closing a chat tab merely hides it without deleting the conversation. Pinning, grouping and other triage controls organize attention and do not establish that an agent has stopped.
Before deleting, integrate or commit worktree changes and preserve files that exist only there. Uncommitted files in a removed worktree can be lost. For current Copilot harness sessions, shared worktrees remain while another linked session still uses them and are removed after the final linked session is deleted or archived.
These are session and resource lifecycle actions. They do not prove that external operations were undone or that the resulting files are correct.
References: Manage agent sessions in VS Code.
Full explanation
GH-700: Manage Copilot Sessions and Context Across Clients
Study guide · GH-700
Read the full explanation