← Home
Use AI Today

GitHub shows how to open a Copilot app session in VS Code, read the diff and run tests before you push

GitHub's guide to continuing a Copilot app session in VS Code: eight steps to read the diff, run the tests and push only when both are done.

An agent (AI software that carries out many steps on its own) has finished most of the changes in the GitHub Copilot app (GitHub’s app for handing tasks to an AI assistant that writes code). You want to look at one detail, fix a few lines by hand and run the project on your machine before pushing. On October 19, 2026, GitHub published a guide to opening that same session in Visual Studio Code (VS Code, Microsoft’s code editor) without starting over. For whoever takes the work over, the part worth following is the order: read the diff (the side-by-side view of changed lines) first, run the tests second, and push (send to the shared code repository) only when both are done.

What GitHub says the session carries over

According to GitHub’s post, a session in the Copilot app is more than a few edited files. It also records the task, the plan and the conversation that led to the changes. When you choose Open in VS Code from the session, VS Code opens the project using the worktree (a separate working copy of the same repository) tied to that session and shows the existing session in the Copilot sidebar. GitHub lists three things that stay intact: the context, meaning the task, plan and conversation; the diff of the files the agent changed; and the very worktree the session used.

Prerequisites per the post: the Copilot app installed and signed in; VS Code installed and connected to the same GitHub account; a session with changes to review; permission to work in and push to the session’s repository; and familiarity with VS Code, its integrated terminal, Git branches and pull requests (requests to merge code).

Follow this order

  1. In the Copilot app, open the session you are taking over and reread the task and what the agent reports as done.
  2. Choose Open in VS Code. If the app asks which editor to use, pick the VS Code installation you use for the project. The right sign: the Copilot sidebar shows the earlier conversation and the project is open on the session’s branch.
  3. Open Source Control in VS Code, select each changed file and read the diff line by line. GitHub suggests asking five things: does the code solve the requested problem, does it follow the repository’s conventions, are error states and edge cases handled, do the tests cover what changed, and was any unrelated file or behavior modified.
  4. If a passage is unclear, ask right away in the sidebar. GitHub’s example: “Explain why you changed this function instead of adding a new helper. Identify any behavior this could affect.”
  5. Edit by hand whatever you know needs changing. You are editing the session’s own worktree, so there is no copying files back and forth.
  6. Open the integrated terminal (a command-line window inside VS Code) and run the project’s usual checks. For a web app, GitHub gives npm install, npm test, npm run lint and npm run dev as examples; the real commands depend on your repository. If the development server prints a localhost URL (an address that opens only on your own machine), open it in a browser to try the behavior.
  7. When several places need changing, or the same change repeats, ask Copilot inside the session, for example: “Add a test for the updated label and run the relevant test file. Do not modify unrelated components.” The session keeps its context, so Copilot understands “updated label” as the spot you just edited by hand.
  8. Review the final diff once more, then use Source Control or the terminal with git status, git add, git commit and git push. Because VS Code is on the session’s branch, the push updates the pull request already tracking this work.

When a step goes wrong

If a test fails, do not push. Read the error, work out whether it sits in the agent’s part or in your own edit, then fix it by hand or send the exact error message to Copilot in the same session. If the diff contains a file you do not remember assigning, ask Copilot why it changed and revert it if there is no reason. If Open in VS Code does not appear or VS Code does not open the right branch, stop and check which VS Code installation was selected, whether VS Code is signed in to the same GitHub account as the Copilot app, and your access to the repository; GitHub’s post does not say how to handle these cases.

The first time, try it on a small, low-risk project.

Sources

  1. GitHub Blog, “How to continue a GitHub Copilot app session in VS Code” (October 19, 2026) — describes the steps for opening a Copilot app session in VS Code, reviewing the diff, running checks and pushing; this is the vendor’s own source and has not been independently verified.