Guide

How to Continue a GitHub Copilot App Session in VS Code

A GitHub guide on transferring Copilot agent work into the editor with full conversation context and worktree intact

4 min read
עב
How to Continue a GitHub Copilot App Session in VS Code
Based on original reporting byGitHub AI and ML ↗Translated and summarized by our AI-assisted news systemHow we work

Executive summary

What to know

  1. A GitHub Copilot app session can be opened directly in VS Code without restarting or summarizing the conversation.

  2. The editor receives the session context, the diff view, and the isolated worktree used by the agent.

  3. Developers can make manual edits, run test and verification commands in the terminal, and continue prompting Copilot.

  4. Pushing changes from the editor directly updates the existing pull request associated with that session.

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:

  1. The GitHub Copilot app is installed and signed in.
  2. Visual Studio Code is installed and connected to the same GitHub account.
  3. A Copilot app session exists with code changes that one wants to review or continue.
  4. 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.

Was this useful for your business?

Questions & Answers

FAQ

This article was produced by our AI-assisted system through translation, summarization, and automated quality controls based on original reporting by GitHub AI and ML. Read about our editorial process. Link to the original source.

Get useful AI updates by email

A concise digest from our news desk.

More articles you might like

All articles
בניית סוכן נסיעות קולי עם Bedrock AgentCore ו-Nova Sonic
מדריך
4 דקות
מ־AWS Machine Learning

בניית סוכן נסיעות קולי עם Bedrock AgentCore ו-Nova Sonic

בפוסט טכני של AWS הציגו מומחי החברה ארכיטקטורה לפריסת סוכן נסיעות קולי לחברות תעופה. הפתרון משלב את Amazon Bedrock AgentCore לניהול והרצת סוכנים, מודל הדיבור Amazon Nova 2.5 Sonic לקול בזמן אמת, ו-Amazon Bedrock Knowledge Bases למענה על שאלות מדיניות מתוך מסמכים. המערכת מקשרת בין הסוכן לשירותי ה-backend באמצעות פרוטוקול Model Context Protocol (MCP) ומאפשרת טיפול בהזמנות, החלפת מושבים והסלמה לנציג אנושי.

קרא עוד
מדריך כלי ה-AI ללא קוד לעסקים קטנים לפי Salesforce
מדריך
4 דקות
מ־Salesforce Blog

מדריך כלי ה-AI ללא קוד לעסקים קטנים לפי Salesforce

מאמר שפורסם על ידי חברת Salesforce סוקר את תחום כלי ה-AI ללא קוד (No-Code AI) עבור עסקים קטנים ובינוניים. לפי נתוני דוח המגמות המצוטט במאמר, 75% מהעסקים הקטנים משקיעים בבינה מלאכותית, אך 88% מתוכם עדיין נמצאים בשלב הבחינה. המאמר מפרט קריטריונים לבחירת כלים, סוקר פתרונות בתחומי המכירות, השיווק, האוטומציה, השירות והדוחות, ומדגיש את היתרון של פלטפורמה מחוברת שבה 91% ממשתמשי ה-AI מדווחים על גידול בהכנסות לעומת שימוש בכלים נקודתיים מבודדים.

קרא עוד
בדיקת פרומפטים ליישומי LLM: מדריך n8n לזיהוי רגרסיות
מדריך
4 דקות
מ־n8n

בדיקת פרומפטים ליישומי LLM: מדריך n8n לזיהוי רגרסיות

מדריך שפורסם על ידי n8n מפרט כיצד מסגרות עבודה לבדיקת פרומפטים מאפשרות לאתר רגרסיות ביישומי LLM לפני עלייתם לסביבת הייצור. בשל האופי הבלתי-דטרמיניסטי של מודלי שפה, בדיקות התאמה מדויקת מסורתיות אינן מספקות. המדריך סוקר כלים נפוצים בתחום, מבחין בין שיטות הערכה דטרמיניסטיות לבין שימוש ב-LLM כשופט, ומציג כיצד לבצע בדיקות והשוואות מול קו בסיס ישירות בתוך פלטפורמת n8n.

קרא עוד
אופטימיזציית עלויות וזמני תגובה עם Prompt Caching ב-Bedrock
מדריך
3 דקות
מ־AWS Machine Learning

אופטימיזציית עלויות וזמני תגובה עם Prompt Caching ב-Bedrock

בפוסט של ארכיטקט הפתרונות דניאל אביב מ-AWS, מוסבר כיצד מנגנון ה-Prompt Caching ב-Amazon Bedrock מפחית עד 90% מעלויות טוקני הקלט על פגיעות במטמון ומקצר את זמן התגובה לטוקן הראשון (TTFT). המאמר סוקר שישה תרחישי יישום באמצעות ה-Converse API: שמירת מסמכים, שמירת פרומפט מערכת, שמירת הגדרות כלים לסוכנים, שילוב זמני חיים שונים (Mixed TTL), בידוד דיירים במערכות מרובות משתמשים באמצעות תחילית SHA-256, ואינטגרציה עם ספריית LangChain. מודלי Anthropic Claude Sonnet 4.5 ו-4.6 דורשים סף מינימלי של 1,024 טוקנים להפעלת המטמון.

קרא עוד