According to a tutorial published on the GitHub Blog, developers can open a GitHub Copilot app session directly in Visual Studio Code and continue working with the conversation, code changes, and working context kept intact. The guide notes that when the software agent finishes the bulk of a change, a need arises to inspect a specific implementation detail, make manual adjustments to a few lines of code, and run the project locally before shipping it. Instead of choosing between staying in the application or starting over in the editor, opening in VS Code allows Copilot to handle repetitive or time-consuming work, then hand control back to the developer for closer review, hands-on editing, and local testing.
Prerequisites for Continuing Work in the Editor
According to the guide, before starting the process, four prerequisites must be met:
- The GitHub Copilot app is installed and signed in.
- Visual Studio Code is installed and connected to the same GitHub account.
- A Copilot app session exists with code changes that one wants to review or continue.
- Permission exists to work in and push changes to the session's repository. In addition, the tutorial assumes that the user is already comfortable navigating VS Code, running commands in the editor's integrated terminal, and working with Git branches and pull requests.
Opening the Session and Moving to VS Code
The first step begins with the working session in the Copilot app. The guide suggests first reviewing the task and the work Copilot completed, explaining that a session contains, beyond a collection of modified files, a record of the task, the plan, and the conversation that led to those changes. This context helps in understanding why a particular implementation was chosen or in asking for a revision. There is no need to summarize the history or copy it into a new chat.
In the second step, one selects the "Open in VS Code" option from the session. If the app displays more than one supported editor or more than one VS Code installation, the user should choose the one they want to use. Upon opening, VS Code loads the project using the worktree associated with the session and displays the existing session in the Copilot sidebar. This action provides three connected pieces of the original work: the session context, in which the task, plan, and conversation remain available; the diff view, in which the files and lines changed by the agent are ready for review; and the worktree, where the editor opens the same isolated working tree that the session used. The user continues the existing session rather than reconstructing it in a new editor window.
Reviewing the Agent's Changes and Making Manual Edits
The third step focuses on inspecting the changes before making edits. To do this, open the Source Control view in VS Code to see the modified files, and then select a file to review its changes line by line. The guide instructs checking whether the code solves the requested problem, whether the implementation follows repository conventions, whether error states and edge cases are handled appropriately, whether tests cover the changed behavior, and whether modifications to unrelated files or behaviors were avoided. The preserved conversation helps in understanding how Copilot arrived at the implementation, and if necessary, one can continue prompting it in the sidebar (for example, asking for an explanation of why a specific function was modified instead of adding a helper function, or requesting another change without redescribing the task).
In the fourth step, after understanding the proposed changes, any file can be edited directly in VS Code. The guide notes that manual editing is useful for adjustments that are faster or easier to make by hand, such as refining a label or error message, renaming a variable for clarity, adjusting layout or styling, adding a missing test case, or applying a repository-specific convention. The editing is done directly in the session's worktree, so manual changes build directly on top of the agent's work without needing to copy files between directories or recreate the branch.
Local Verification, Continuing Work, and Pushing Changes
In the fifth step, run the project's normal validation workflow through the integrated terminal in VS Code. The exact commands depend on the repository, but examples in web applications include: npm install, npm test, npm run lint, and npm run dev. The guide emphasizes that agent-generated code should be treated the same way as code written by a person: run relevant tests, inspect failures, and verify behavior independently. If the development server displays a localhost URL, it can be opened in a browser, and if the VS Code installation supports it, the URL can be opened in the editor's integrated browser. For user interface changes, verify the requested behavior as well as nearby states, such as checking the component across different viewport sizes and confirming that loading, empty, and error states function properly.
In the sixth step, one can choose at any moment the interaction approach that best fits: prompt Copilot when the change requires repository-wide analysis or repetitive edits, or edit directly when the desired change is known precisely. The two approaches can be combined iteratively. For example, after manually adjusting an interface, one can ask Copilot to add a test for the updated label and run the relevant test file without modifying unrelated components, with the agent retaining the context needed to identify what the updated label is.
In the seventh and final step, review the final diff once more, and commit and push using the Source Control view or the integrated terminal via the commands git status, git add, git commit, and git push. The work is conducted according to the repository's normal branch, commit, review, and approval practices. Because VS Code opened the worktree and branch associated with the session, pushing the branch updates the pull request already tracking that work, without any need to copy files to another workspace or manually reconnect the work to the pull request. In conclusion, the guide notes that opening a Copilot app session in VS Code enables a clean division of labor where the session, diff view, and worktree move alongside the developer into the editor.