How to continue a GitHub Copilot app session in VS Code
Learn how to move an agent session from the GitHub Copilot app into VS Code without losing the conversation, code changes, or working context. The post How to continue a GitHub Copilot app session in VS Code appeared first on The GitHub Blog .
To continue a GitHub Copilot app session in VS Code, you need to follow a few steps. First, ensure you have the GitHub Copilot app installed, Visual Studio Code installed, and signed in with the same GitHub account. Then, open the Copilot app session you want to continue. Review the task, the work done by Copilot, and its context, which includes the task, plan, and conversation that produced the changes.
Open the session in VS Code by selecting "Open in VS Code" from the session. VS Code will open the project using the worktree associated with the session and display the existing session in the Copilot sidebar. This allows you to have access to the session context, diff, and worktree.
Review the changes made by Copilot in VS Code. Use the Source Control view to see the changed files, then open a file to inspect the changes line by line. Verify that the code solves the problem, follows the repository's conventions, handles error states and edge cases appropriately, and that relevant tests cover the changed behavior. Remind yourself of the conversation between you and Copilot, as it may help understand the implementation.
Once you're satisfied with the changes, make a hands-on edit in VS Code. This could involve refining labels, renaming variables, adjusting layout or styling, adding missing test cases, or applying repository-specific conventions. Since you're still connected to the session and worktree, your manual changes will build on the agent's work.
Run the project locally using the VS Code integrated terminal. The exact commands depend on the repository, but common examples include running `npm install`, `npm test`, `npm run lint`, or `npm run dev`. If the development server shows a localhost URL, open it in a browser to test the change. When appropriate, open the URL in VS Code's integrated browser to inspect the results.
At any point, you can decide whether to ask Copilot for further analysis or to continue editing yourself. Prompt Copilot when the change requires repository-wide analysis or repetitive edits, or edit directly for specific changes. Continue iterating as needed, always keeping the session context in mind to ensure consistency.
Written by urgent.news from GitHub Blog's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.