Skip to content

Commit acdbc6a

Browse files
authored
Merge pull request #8316 from microsoft/agent-mode-auto-approve
Add tools auto-approval setting
2 parents 9213413 + 42ab1af commit acdbc6a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

docs/copilot/chat/chat-agent-mode.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ You can access agent mode from the chat mode dropdown in the Chat view (open in
4646

4747
Before running a terminal command or non-builtin tool, Copilot requests confirmation to continue. This is because tools might run locally on your machine and perform actions that modify files or data.
4848

49-
Use the **Continue** button dropdown options to automatically confirm the specific tool for the current session, workspace, or all future invocations. You can reset the tool confirmations by using the **Chat: Reset Tool Confirmations** command.
49+
Use the **Continue** button dropdown options to automatically confirm the specific tool for the current session, workspace, or all future invocations. Learn how to [manage tool approvals and approve all tool invocations](#manage-tool-approvals).
5050

5151
![MCP Tool Confirmation](images/mcp-servers/mcp-tool-confirmation.png)
5252

@@ -88,6 +88,18 @@ You can view and manage the tools that can be used for responding to a request.
8888

8989
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.
9090

91+
## Manage tool approvals
92+
93+
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.
94+
95+
In the Chat view, after a tool invocation, use the **Continue** button dropdown options to automatically confirm the specific tool for the current session, workspace, or all future invocations.
96+
97+
![MCP Tool Confirmation](images/mcp-servers/mcp-tool-confirmation.png)
98+
99+
You can reset the tool confirmations by using the **Chat: Reset Tool Confirmations** command in the Command Palette.
100+
101+
In case you want to auto-approve _all_ tools, you can now use the experimental `setting(chat.tools.autoApprove)` setting. This will automatically approve all tool invocations, and VS Code will not ask for confirmation when a language model wishes to run tools. Bear in mind that with this setting enabled, you will not have the opportunity to cancel potentially destructive actions a model wants to take.
102+
91103
## Accept or discard edits
92104

93105
Copilot lists the files that were edited in the list of the changed files in the Chat view. Files with pending edits also have an indicator in the Explorer view and editor tabs.
@@ -134,6 +146,7 @@ The following list contains the settings related to agent mode. You can configur
134146
* `setting(chat.agent.maxRequests)`: maximum number of requests that Copilot Edits can make in agent mode (default: 5 for Copilot Free users, 15 for other users)
135147
* `setting(github.copilot.chat.agent.runTasks)`: run workspace tasks when using agent mode in Copilot Edits (default: `true`)
136148
* `setting(chat.mcp.discovery.enabled)`: enable or disable discovery of MCP servers configured in other tools (default: `true`)
149+
* `setting(chat.tools.autoApprove)` _(Experimental)_: automatically approve all tools (default: `false`)
137150

138151
## Frequently asked questions
139152

docs/copilot/reference/copilot-settings.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ The team is continuously working on improving Copilot in VS Code and adding new
5353
* `setting(github.copilot.chat.newWorkspaceCreation.enabled)` _(Experimental)_: Enable the agent mode tool for scaffolding a new workspace in chat.
5454
* `setting(github.copilot.chat.edits.temporalContext.enabled)` _(Experimental)_: Whether to include recently viewed and edited files with requests in Copilot Edits.
5555
* `setting(github.copilot.chat.edits.suggestRelatedFilesFromGitHistory)` _(Experimental)_: Suggest related files from git history in Copilot Edits (default: `false`)
56+
* `setting(chat.tools.autoApprove)` _(Experimental)_: Automatically approve all tools (default: `false`)
5657

5758
## Inline chat settings
5859

0 commit comments

Comments
 (0)