Introduction of Agent Mode for GitHub Copilot in VS Code, announcement of the general availability of Copilot Edits, and preview of our SWE agent.
Since the launch of GitHub Copilot in 2021, the goal has been clear: to simplify developers’ work with an AI assistant capable of supporting them in writing better code. The name itself reflects the belief that AI should not replace the developer, but accompany them. Like any good co-pilot, it can operate autonomously, for example by providing feedback on pull requests, fixing security vulnerabilities, or suggesting strategies for implementing a feature.
Today, GitHub Copilot evolves with even more agent-like intelligence, introducing Agent Mode and making Copilot Edits available to all VS Code users. Additionally, Gemini 2.0 Flash has been added to the model selector, and a preview of the new autonomous Copilot agent, codenamed Project Padawan, is presented. From code completions to chat, from multi-file changes to workspace management, Copilot continues to put developers at the center of the creative process, alleviating repetitive tasks to leave more room for activities that truly matter.
Agent Mode available in preview
The new Agent Mode in GitHub Copilot can iterate on its own code, identify errors, and fix them automatically. It can also suggest terminal commands and request that they be executed, analyzing runtime errors with self-healing capabilities.
In this mode, Copilot doesn’t just iterate on its own output but also on the result of that output, continuing to iterate until all the sub-tasks required to complete the prompt have been executed. Copilot now doesn’t just complete the requested task; it can deduce additional, unspecified tasks that are nonetheless essential for the correct functioning of the main request. Furthermore, it can detect its own mistakes, eliminating the need to copy and paste between the terminal and chat.
A concrete example of using GitHub Copilot in Agent Mode could be creating a web app to track marathon training. To enable Agent Mode, you need to download VS Code Insiders and enable the GitHub Copilot Chat setting.
In the Copilot Changes panel, simply switch from “Edit” mode to “Agent” next to the model selector.
Agent Mode will change the way developers work within their editor. For this reason, it will be extended to all IDEs supported by Copilot. It is acknowledged that the current Insiders version is not perfect, but user feedback is welcomed as improvements are made to both VS Code and the agent technology in the coming months.
Copilot Edits, now available in VS Code
Announced at GitHub Universe last October, Copilot Edits combines the best of Chat and Inline Chat, offering a conversational flow and the ability to make inline edits on a set of managed files. Feedback from users provided in the past has played a crucial role in making this feature available as a stable (GA) version in VS Code.
With Copilot Edits, you can specify a set of files to modify and then use natural language to communicate your needs to GitHub Copilot. Copilot Edits applies inline changes directly within the workspace, across multiple files simultaneously, thanks to a user interface designed for rapid iteration. This allows developers to stay focused on the code, reviewing suggested changes, accepting valid ones, and iterating with follow-up requests.
Behind the scenes, Copilot Edits leverages a dual-model architecture to improve editing efficiency and accuracy. A base language model considers the entire context of the editing session to generate the initial edit suggestions. You can choose from various language models, such as OpenAI’s GPT-4o, o1, or o3-mini, Anthropic’s Claude 3.5 Sonnet, and now Google’s Gemini 2.0 Flash. To optimize the experience, a speculative decoding endpoint has been developed to quickly apply changes to the files. The changes suggested by the language model are sent to the speculative decoding endpoint, which proposes them inline in the editor.
Copilot Edits works because it allows the user to stay in control, from setting the right context to accepting the changes. The experience is iterative: if the model makes a mistake, you can review changes across multiple files, accept the correct ones, and repeat the process until the optimal solution is reached. Once the changes are accepted, you can run the code to verify them and, if necessary, undo the changes in Copilot Edits to return to a previous working state. Copilot Edits is located in the secondary sidebar (by default on the right), allowing interaction with other views in the primary sidebar, such as Explorer, Debug, or Source Control, while reviewing the proposed changes. For example, you can run unit tests in the Testing view on the left while using Copilot Edits on the right to check if the proposed changes pass the tests.
Voice usage with Copilot Edits feels natural, making the interaction seamless and conversational, as if you were collaborating with an experienced colleague, following the same iterative flow typical of pair programming.
The next step on the roadmap includes improving the performance of the speculative decoding endpoint to apply changes, supporting transitions from Copilot Chat to Copilot Edits while preserving context, suggesting files for the work set, and allowing the undoing of suggested change blocks. To try these improvements early, you can use the Insiders version of VS Code and the pre-release version of the GitHub Copilot Chat extension. To help improve the feature, you can report any issues in the repository.
In addition to general availability in VS Code, Copilot Edits is now also available in preview for Visual Studio 2022.
Source: Thomas Dohmke.
Leave a comment