Agent Mode & Copilot Coding Agent
Use Copilot Agent Mode for autonomous multi-file edits in your editor, and the Copilot Coding Agent to delegate whole GitHub issues to Copilot in the cloud.
Use Copilot Agent Mode for autonomous multi-file edits in your editor, and the Copilot Coding Agent to delegate whole GitHub issues to Copilot in the cloud.
Agent mode turns Copilot into an autonomous coding partner that operates across your entire codebase. Instead of generating code for you to review and apply, Copilot in agent mode:
In VS Code with Copilot Chat open, click the mode selector dropdown (labeled "Ask" by default) and switch to "Agent".
Agent mode has access to:
By default, Copilot asks for confirmation before running terminal commands. You can configure this behavior in settings.
Every file change is shown in a diff view before being applied permanently. At the end of a task, a summary shows all files changed, commands run, and packages installed.
If a step goes wrong, type a follow-up in chat:
The test for the users endpoint is still failing — fix it
Copilot reads the test output, diagnoses the issue, and proposes a fix — iterating until the tests pass or it needs more information.
Agent mode is available in VS Code, JetBrains IDEs, Visual Studio, and Eclipse. The exact capabilities (like terminal access) vary by IDE.
The Copilot Coding Agent is a cloud-based autonomous agent that you assign to a GitHub Issue. Copilot works in a cloud environment, writes code, opens a pull request, and responds to your review comments.
This is a step beyond editor-based agent mode — it runs without you watching, handles hours-long tasks, and creates a full PR with description and linked issue.
On any GitHub Issue page (in github.com, VS Code, or GitHub Mobile):
Copilot begins working immediately. It creates a draft branch, writes code, commits iteratively, and opens a pull request when done.
The Copilot Coding Agent responds to review comments on its pull request. You can:
The agent iterates and pushes new commits in response.
Before Copilot starts coding, it shares a plan — a high-level description of its intended approach. You can review the plan, ask clarifying questions, or redirect it before any code is written.
This happens automatically for complex issues. For simple ones, Copilot may skip directly to coding.
The Copilot Coding Agent requires:
The feature is generally available for Pro+ and above. Check github.com/features/copilot for current availability.
The gh copilot CLI extension brings Copilot to your terminal:
Two primary commands:
gh copilot suggest — describe a task in plain English, get a shell commandgh copilot explain — paste any shell command and get a plain-English explanationAgent mode handles complex multi-file tasks autonomously in your editor. The Copilot Coding Agent takes that further — working in the cloud on entire GitHub Issues and creating pull requests. The CLI integration brings AI assistance to your terminal. The next module covers how to customize all of this with project-specific instructions, prompt files, and MCP servers.