Developers can transition an active Copilot app session into Visual Studio Code while retaining the full conversation thread, all code modifications, and the original working context. This workflow allows AI-assisted agents to handle bulk implementation work, then pass control back to engineers for detailed inspection, manual refinements, and local testing.
The handoff preserves three critical elements: the session context containing the original task and plan, the diff showing exactly what changed, and the isolated worktree that the session used. Developers avoid the need to restart conversations, re-describe tasks, or manually reconstruct branches in a new environment.
Workflow overview
- Open a Copilot app session in VS Code
- Review the agent's changes line by line
- Continue the same conversation from your editor
- Modify and test the code locally
- Push your updates to the pull request associated with the session
Step 1: Start with a session in the Copilot app
Begin by opening the session you intend to continue. Take time to examine the task and the work Copilot has completed before initiating the transfer.
A session stores far more than just modified files—it captures the task description, the execution plan, and the entire conversation that led to those changes. This historical context matters when evaluating why Copilot selected a particular implementation or when requesting revisions. There is no need to manually summarize this history or paste it into a fresh chat before switching to VS Code.
Step 2: Open the session in VS Code
From within the session, select Open in VS Code. If the app detects multiple supported editors or VS Code installations, choose the target environment.
VS Code launches the project using the worktree associated with the session and displays the existing session in the Copilot sidebar. This integration provides three connected components of the original work:
- The session context: Task, plan, and conversation remain accessible
- The diff: Files and lines modified by the agent are ready for inspection
- The worktree: VS Code opens the same isolated working tree the session used
The developer is continuing the existing session rather than rebuilding it in a separate editor window.
Step 3: Review the agent's changes
Before making any edits, examine the diff in VS Code. Open the Source Control view to see which files changed, then select individual files to review modifications line by line.
Evaluate the implementation as you would any peer-submitted change. Verify that:
- The code addresses the stated problem
- The implementation adheres to repository conventions
- Error conditions and edge cases receive proper handling
- Tests validate the modified behavior
- No unrelated files or functionality were altered
The preserved conversation can clarify Copilot's reasoning. If questions arise, continue prompting Copilot through the sidebar. For instance:
Explain why you changed this function instead of adding a new helper. Identify any behavior this could affect.
You can also request additional changes. Since the session and worktree remain connected, there is no need to restate the original task.
Step 4: Make a hands-on edit
After understanding the proposed changes, edit files directly within VS Code.
This approach works well for adjustments that are quicker or simpler to perform manually:
- Refining a label or error message
- Renaming a variable for clarity
- Adjusting layout or styling
- Adding a missing test case
- Applying a repository-specific convention
Manual edits build directly on the agent's work within the session's existing worktree. There is no need to copy files between directories or manually recreate the branch.
Step 5: Run and verify the project locally
Use the VS Code integrated terminal to execute the project's standard validation workflow. Specific commands vary by repository, but typical web app examples include:
- npm install
- npm test
- npm run lint
- npm run dev
Treat agent-generated code the same way you would treat human-written code: run applicable tests, investigate failures, and independently verify behavior.
If the development server outputs a localhost URL, open it in a browser to test the change. When your VS Code setup supports it, you can open the URL in VS Code's built-in browser and inspect results without leaving the editor.
For user-interface modifications, validate both the intended behavior and surrounding states. For example, test the modified component across different viewport sizes and confirm that loading, empty, and error states remain functional.
Step 6: Continue with Copilot or keep editing yourself
At any stage, select the interaction method that suits the next task:
- Prompt Copilot when the change demands repository-wide analysis or repetitive edits
- Edit directly when you know the exact change needed
- Alternate between both approaches as you test and refine the implementation
For example, after making a manual UI adjustment, you might ask Copilot:
Add a test for the updated label and run the relevant test file. Do not modify unrelated components.
Because you remain in the original session, Copilot retains the context to understand references like "the updated label."
Step 7: Commit and push the finished changes
Once the implementation is complete, review the final diff one last time. Then commit and push using the Source Control view or the integrated terminal:
- git status
- git add
- git commit -m "Refine session changes"
- git push
Follow your repository's standard branch, commit, review, and approval procedures. Since VS Code opened the worktree and branch tied to the session, pushing the branch automatically updates the pull request already tracking that work. No manual file copying or pull request reconnection is required.
A continuous workflow from agent to editor
Opening a Copilot app session in VS Code creates a clean separation of responsibilities without fragmenting the work itself. Agents can tackle larger or repetitive implementation tasks, while developers move into the editor for thorough review, targeted modifications, local testing, and final refinement.
The session, diff, and worktree travel together throughout the process. Direct work in the Copilot app, switch to VS Code whenever hands-on control is needed, and push the completed result through the standard pull request workflow.