Skip to content

Back to the catalog

How to continue a GitHub Copilot app session in VS Code
github.blogarticle

How to continue a GitHub Copilot app session in VS Code

This GitHub Blog tutorial shows how to open a GitHub Copilot app agent session in VS Code with its conversation, plan, diff and worktree intact. It walks through reviewing the agent's changes in Source Control, prompting Copilot from the sidebar, editing by hand, running tests locally, and pushing to the session's existing pull request.

TL;DR Explains how to move a Copilot app agent session into VS Code, review and edit its changes, test locally, and push to the same pull request.
Document

What it claims

The GitHub Copilot app has an "Open in VS Code" action that hands a running agent session to the editor. The handoff keeps the session's task, plan and conversation, the agent's diff, and the isolated worktree the session used. VS Code opens the project from that worktree and shows the same session in the Copilot sidebar. The session is continued, not recreated, so follow-up prompts need no restated task.

How it works

The handoff starts from inside the session in the Copilot app. If more than one supported editor or VS Code installation is present, the app asks which one to use. The agent's changes show as uncommitted edits in the Source Control view, which supports line-by-line review.

Manual edits land in the same worktree and branch the agent used. No files are copied between directories and no branch is recreated. Because the branch already backs the session's pull request, a normal git push updates that pull request with no manual reconnection.

Prompts in the sidebar can refer to earlier context. The page's example is "Add a test for the updated label and run the relevant test file. Do not modify unrelated components." Copilot resolves "the updated label" from the session history. When the setup supports it, a dev server's localhost URL can open in VS Code's integrated browser.

Limits

The page gives no version requirements for VS Code, the Copilot extension or the Copilot app, and no plan or licence requirements. It does not say whether the handoff works in reverse, from VS Code back to the app. It does not cover what happens when the app and editor both edit the worktree, or which editors besides VS Code count as "supported." The npm commands it lists (npm install, npm test, npm run lint, npm run dev) are generic examples for a web project, not part of the feature.

Organisations named here

  • GitHub
  • Microsoft
  • GitHub Copilot

Technologies named here

  • GitHub Copilot app
  • Visual Studio Code
  • Copilot sidebar
  • Source Control view
  • VS Code integrated terminal
  • VS Code integrated browser
  • git worktree
  • GitHub Copilot
  • VS Code
  • Git
  • GitHub
  • npm

Techniques named here

  • Continuing a Copilot app session in VS Code
  • Mixed agent and manual iteration