Skip to content

Commit 91f4773

Browse files
authored
Merge pull request #14301 from ShawnJackson/github-copilot-editor-articles
[AQ] edit pass: Articles about the GitHub Copilot editor
2 parents 29aced7 + b63ad15 commit 91f4773

File tree

6 files changed

+352
-324
lines changed

6 files changed

+352
-324
lines changed

docs/ide/copilot-agent-mode.md

Lines changed: 70 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: 'Use agent mode'
3-
description: Use GitHub Copilot Agent to iterate on code in Visual Studio by making code edits, running commands, and reading error/build context.
2+
title: Use Agent Mode
3+
description: Use the GitHub Copilot agent to iterate on code in Visual Studio by making code edits, running commands, and reading error/build context.
44
ms.date: 7/28/2025
55
ms.update-cycle: 180-days
66
ms.topic: get-started
@@ -11,15 +11,15 @@ ms.subservice: ai-tools
1111
ms.collection: ce-skilling-ai-copilot
1212
monikerRange: '>= vs-2022'
1313
---
14-
# Use Copilot agent mode
14+
# Get started with GitHub Copilot agent mode
1515

16-
With GitHub Copilot's agent mode in Visual Studio, you can use natural language to specify a high-level task. AI will create a plan, make code edits, run terminal commands, invoke tools, and apply changes across your codebase. It monitors outcomes, such as build results, unit test failures, or tool outputs, and iterates as needed.
16+
With the GitHub Copilot agent mode in Visual Studio, you can use natural language to specify a high-level task. AI creates a plan, makes code edits, runs terminal commands, invokes tools, and applies changes across your codebase. It monitors outcomes, such as build results, unit-test failures, or tool outputs, and iterates as needed.
1717

18-
Unlike *ask mode*, *agent mode* doesn't stop after a single response. It continues executing and refining steps until the goal in your prompt is reached or additional input is required.
18+
Unlike *ask mode*, agent mode doesn't stop after a single response. It continues running and refining steps until you reach the goal in your prompt or more input is required.
1919

2020
## Prerequisites
2121

22-
[Visual Studio 2022 version 17.14](/visualstudio/releases/2022/release-history) or later.
22+
You need [Visual Studio 2022 version 17.14](/visualstudio/releases/2022/release-history) or later.
2323

2424
## Use agent mode
2525

@@ -29,119 +29,131 @@ Follow these steps to get started:
2929

3030
1. Open the Copilot Chat window, select **Ask** to expand the mode dropdown, and then select **Agent**.
3131

32-
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-dropdown.png" alt-text="Screenshot that shows Copilot agent mode selector." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-dropdown.png":::
32+
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-dropdown.png" alt-text="Screenshot that shows the Copilot agent mode selector." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-dropdown.png":::
3333

34-
1. Enter your prompt, and then select **Send** or press **Enter** to submit it. You can specify a high-level requirement, and you don't have to specify which files to work on.
34+
1. Enter your prompt, and then select **Send** or select the <kbd>Enter</kbd> key to submit it. You can specify a high-level requirement, and you don't have to specify which files to work on.
3535

36-
1. Agent mode might invoke multiple tools to accomplish different tasks. Optionally, select the **Tools** icon to configure which additional tools can be used for responding to your request.
36+
1. Agent mode might invoke multiple tools to accomplish different tasks. Optionally, select the **Tools** icon to configure which additional tools the agent can use for responding to your request.
3737

38-
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-tools-list.png" alt-text="Screenshot that shows additional tools used by agent mode." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-tools-list.png":::
38+
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-tools-list.png" alt-text="Screenshot that shows additional tools that agent mode uses." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-tools-list.png":::
3939

40-
1. Copilot requests confirmation before running a terminal command or using a non-builtin tool.
40+
1. Copilot requests confirmation before running a terminal command or using a tool that isn't built in.
4141

4242
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-command-approval.png" alt-text="Screenshot that shows agent command approval." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-command-approval.png":::
4343

44-
1. Copilot automatically detects issues in code edits or terminal commands, and then takes additional actions to resolve them. The process repeats until the issue is resolved.
44+
1. Copilot automatically detects issues in code edits or terminal commands, and then takes action. The process repeats until the issues are resolved.
4545

46-
1. As Copilot processes your request, it streams the suggested code edits directly in the editor. Review the suggested edits and either keep or discard the suggested edits as a whole in **Total Changes** in the chat window, or review individual file diffs and apply them selectively.
46+
1. As Copilot processes your request, it streams the suggested code edits directly in the editor. Review the suggested edits and either:
4747

48-
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-keep-undo.png" alt-text="Screenshot that shows the list of suggested edits." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-keep-undo.png":::
48+
- Keep or discard the suggested edits as a whole in **Total changes** in the chat window.
4949

50-
1. If you want to review individual code changes made by the agent, you can either review the specific change made at each step, or review the cumulative changes from the last time changes were kept or undone.
50+
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-keep-undo.png" alt-text="Screenshot that shows a list of suggested edits." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-keep-undo.png":::
5151

52-
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-stepwise-edits.png" alt-text="Screenshot that shows accessing individual edit diffs with Copilot agent." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-stepwise-edits.png":::
52+
- Review individual file diffs and apply them selectively.
5353

54-
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-cumulative-edits.png" alt-text="Screenshot that shows accessing cumulative edit diffs with Copilot agent." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-cumulative-edits.png":::
54+
1. If you want to review individual code changes that the agent made, you can either:
5555

56-
1. Continue to iterate on the code changes to refine the edits or implement additional features.
56+
- Review the specific change at each step.
5757

58-
## Agent mode tools
58+
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-stepwise-edits.png" alt-text="Screenshot that shows accessing individual edit diffs with the Copilot agent." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-stepwise-edits.png":::
5959

60-
Agent mode can use the following tools:
60+
- Review the cumulative changes from the last time that changes were kept or undone.
6161

62-
* Built-in tools
63-
* [MCP tools](mcp-servers.md)
62+
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-cumulative-edits.png" alt-text="Screenshot that shows accessing cumulative edit diffs with the Copilot agent." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-cumulative-edits.png":::
6463

65-
You can view and manage the tools that can be used for responding to a request. Select the **Tools** icon in the chat window to view and manage the tools that are available in agent mode.
64+
1. Continue to iterate on the code changes to refine the edits or implement more features.
6665

67-
:::image type="content" source="media/vs-2022/mcp-servers/copilot-agent-partial-tools.png" alt-text="Screenshot that shows Copilot agent tool selector." lightbox="media/vs-2022/mcp-servers/copilot-agent-partial-tools.png":::
66+
## Understand agent mode tools
67+
68+
Agent mode can use the following tools for responding to a request:
69+
70+
- Built-in tools
71+
- [Model Context Protocol (MCP) tools](mcp-servers.md)
72+
73+
To view and manage the tools that are available in agent mode, select the **Tools** icon in the chat window.
74+
75+
:::image type="content" source="media/vs-2022/mcp-servers/copilot-agent-partial-tools.png" alt-text="Screenshot that shows the tool selector for the Copilot agent." lightbox="media/vs-2022/mcp-servers/copilot-agent-partial-tools.png":::
6876

6977
Based on the outcome of a tool, Copilot might invoke other tools to accomplish the overall request. For example, if a code edit results in syntax errors in the file, Copilot might explore another approach and suggest different code changes.
7078

71-
Additional tools added by running MCP servers are not automatically enabled, they are unchecked by default and must be checked to be activated.
79+
Additional tools that you add by running MCP servers are not automatically enabled. Their checkboxes are cleared by default, and you must select them to activate the tools.
7280

7381
## Manage tool approvals
7482

75-
When a tool is invoked, Copilot requests confirmation to run the tool. This is because tools might run locally on your machine and perform actions that modify files or data.
83+
When Copilot invokes a tool, it requests confirmation to run the tool. The reason is that tools might run locally on your machine and perform actions that modify files or data.
7684

77-
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-command-approval.png" alt-text="Screenshot that shows tool confirmation request." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-command-approval.png":::
85+
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-command-approval.png" alt-text="Screenshot that shows a tool confirmation request." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-command-approval.png":::
7886

79-
In the chat window, after a tool invocation, use the **Allow** dropdown options to automatically confirm the specific tool for the current session, solution, or all future invocations.
87+
In the chat window, after a tool invocation, use the **Allow** dropdown options to automatically confirm the specific tool for the current session or solution, or all future invocations.
8088

8189
You can reset tool confirmation selections in **Tools** > **Options** > **GitHub** > **Copilot** > **Tools**.
8290

8391
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-tool-config-options.png" alt-text="Screenshot that shows tool confirmation options." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-tool-config-options.png":::
8492

85-
<!-- TODO: Define what "Reset solution setting does -->
86-
8793
## Accept or discard edits
8894

89-
Copilot lists the files that were edited in the list of **Total Changes** in the Chat window.
95+
Copilot lists the edited files in the **Total changes** list in the chat window.
9096

91-
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-keep-undo.png" alt-text="Screenshot that shows the Total Changes list." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-keep-undo.png":::
97+
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-keep-undo.png" alt-text="Screenshot that shows a list of edited files." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-keep-undo.png":::
9298

93-
Click on each file to review changes individually, where you can **Keep** or **Undo** edits made to each chunk of code.
99+
Select each file to review changes individually. You can keep or undo edits made to each chunk of code.
94100

95-
Alternatively, in the **Total Changes** list, select **Keep** or **Undo** for all edits made since the last time you clicked **Keep** or **Undo**.
101+
Alternatively, in the **Total changes** list, select **Keep** or **Undo** for all edits made since the last time that you selected **Keep** or **Undo**.
96102

97103
## Revert edits
98104

99-
As you request code edits, you may want to undo some changes. To revert, select **Restore** next to the checkpoint prior to the prompt that included changes you didn't want.
105+
As you request code edits, you might want to revert some changes. To revert, select **Restore** next to the checkpoint before the prompt that includes changes you don't want.
100106

101107
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-checkpoint.png" alt-text="Screenshot that shows reverting edits." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-checkpoint.png":::
102108

103-
Currently, Visual Studio Copilot Agent doesn't support stepwise undo/redo.
109+
Currently, the Visual Studio Copilot agent doesn't support stepwise undo or redo.
104110

105111
## Interrupt an agent mode request
106112

107-
To interrupt an ongoing request, you can cancel it.
108-
This stops all running tools and terminal commands.
113+
To interrupt an ongoing request, you can cancel it. Canceling a request stops all running tools and terminal commands.
109114

110-
To stop a build, select **Build** in the top toolbar, and then select **Cancel** or use the **Ctrl + Break** keyboard shortcut.
115+
To stop a build, select **Build** on the top toolbar, and then select **Cancel**. Or use the <kbd>Ctrl+Break</kbd> keyboard shortcut.
111116

112117
## Frequently asked questions
113118

114-
#### What visibility does Agent mode have into my files?
115-
Agent mode can only manipulate local files that are part of the solution, or are located in the open solution directory or its subdirectories.
119+
### What visibility does agent mode have into my files?
120+
121+
Agent mode can manipulate only:
116122

117-
Files and directories excluded by file exclusion are not visible to agent mode.
123+
- Local files that are part of the solution.
124+
- Local files that are in the open solution directory or its subdirectories.
118125

119-
When running terminal commands, Agent mode has the same permissions as the running Visual Studio process and is not limited to the restrictions above. Carefully review proposed terminal commands before running them.
126+
Agent mode can't access files and directories excluded through file exclusion.
120127

121-
#### I don't see Ask and Agent mode in the GitHub Copilot Chat window.
128+
For terminal commands, agent mode has the same permissions as the running Visual Studio process and isn't limited to the preceding restrictions. Carefully review proposed terminal commands before you run them.
122129

123-
Take the following troubleshooting steps in the order specified:
124-
- Make sure you're using Visual Studio 17.14 or later: check the version at **Help** > **About Visual Studio**. If you're not using version 17.14 or later, launch the Visual Studio Installer and update your build.
125-
- Make sure you've selected the **Enable agent mode in the chat pane** setting in **Tools** > **Options** > **GitHub** > **Copilot Chat**.
126-
- Try restarting Visual Studio.
130+
### I don't see ask mode and agent mode in the Copilot Chat window
127131

128-
#### When should I use Ask mode vs. Agent mode?
132+
Take the following troubleshooting steps in the specified order:
133+
134+
1. Make sure you're using Visual Studio 17.14 or later. Check the version at **Help** > **About Visual Studio**. If you're not using version 17.14 or later, open the Visual Studio Installer and update your build.
135+
136+
1. Make sure that you selected the **Enable agent mode in the chat pane** setting in **Tools** > **Options** > **GitHub** > **Copilot Chat**.
137+
138+
1. Try restarting Visual Studio.
139+
140+
### When should I use ask mode vs. agent mode?
129141

130142
- Ask mode is excellent when you want 100% confidence that no code edits are made unless you explicitly select **Apply** or copy and paste the code yourself.
131-
- Agent mode can handle the same conceptual questions, generate code examples without applying them, along with its agent capabilities of editing code.
132-
- If you are looking to use MCP capabilities, you must have agent mode selected.
143+
- Agent mode can handle the same conceptual questions and generate code examples without applying them, along with its agent capabilities of editing code.
144+
- If you want to use MCP capabilities, you must have agent mode selected.
145+
146+
### What happened to Copilot Edits in Visual Studio?
133147

134-
#### What happened to Copilot Edits in Visual Studio?
148+
Agent mode is an evolution of Copilot Edits, with a greater ability to iterate on errors, use tools, and automatically apply code changes.
135149

136-
- We perceive agent mode to be an evolution of Edits, with greater ability to iterate on errors, use tools, and automatically apply code changes.
137-
- For the initial releases of Visual Studio 2022 version 17.14, Edits mode is still available if you uncheck the **Enable agent mode in the chat pane** setting in **Tools** > **Options** > **GitHub** > **Copilot** > **Copilot Chat**.
150+
For the initial release of Visual Studio 2022 version 17.14, Copilot Edits is still available if you clear the **Enable agent mode in the chat pane** setting in **Tools** > **Options** > **GitHub** > **Copilot** > **Copilot Chat**.
138151

139-
#### As an administrator, how do I control use of agent mode for Visual Studio users?
152+
### As an administrator, how do I control the use of agent mode for Visual Studio users?
140153

141-
Agent mode in Visual Studio is governed by the **Editor preview features** flag in the GitHub Copilot dashboard for administrators.
142-
If the administrator turns off this setting, users under that subscription won’t be able to use agent mode in Visual Studio.
154+
Agent mode in Visual Studio is governed by the **Editor preview features** flag on the GitHub Copilot dashboard for administrators. If the administrator turns off this setting, users under that subscription can't use agent mode in Visual Studio.
143155

144-
For more information, see [managing policies and features for copilot in your enterprise](https://docs.github.com/en/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#editor-preview-features).
156+
For more information, see [Managing policies and features for GitHub Copilot in your enterprise](https://docs.github.com/en/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#editor-preview-features).
145157

146158
## Related content
147159

0 commit comments

Comments
 (0)