Based on GitHub / Microsoft’s official docs, checked
GitHub Copilot agent mode: how to use it in your IDE
In agent mode, GitHub Copilot takes a high-level task, decides which files to change, makes the edits and runs commands, and keeps iterating until the task is done. It works inside your editor: you review the changes, and by default you approve commands before they run. GitHub lists agent mode in Visual Studio Code, Visual Studio, JetBrains IDEs, Xcode and Eclipse. This guide covers switching to it, steering it, picking a model and adding tools, based on GitHub’s documentation checked October 30, 2026. For the agent that runs in the cloud and opens pull requests, see our Copilot coding agent guide.
1. Open Copilot Chat
In VS Code, select Open Chat from the Copilot Chat menu. In Visual Studio (17.14 or later), choose View, then GitHub Copilot Chat. In JetBrains IDEs, choose Copilot in the menu bar, then Open GitHub Copilot Chat.
2. Select Agent
In VS Code and Visual Studio, pick Agent from the dropdown at the bottom of the chat; in JetBrains, click the Agent tab at the top. If Agent is missing, your enterprise or organization administrator may have disabled agent mode for your IDE.
3. Describe the task
Submit a prompt. Copilot streams edits into the editor, updates the working set and runs or suggests terminal commands as needed.
4. Approve commands and review the edits
Confirm or reject each terminal command it proposes unless it has been set to run automatically, and undo any streamed edit you don’t want. Copilot iterates on errors until the original task is done.
When to use agent mode
GitHub suggests agent mode when a task is complex and involves several steps, iterations and error handling, when you want Copilot to work out the steps itself, or when the task needs an external application such as an MCP server.
For a large or unclear task, draft an implementation plan first in plan mode, then switch to agent mode to carry it out.
Steering it while it works
Agent mode is interactive. You can send a follow-up prompt to redirect it before it finishes, reject commands, and undo edits as they appear.
To hand a self-contained subtask to a separate agent with its own context, VS Code supports subagents.
Models, custom agents and usage
Before you submit a task you can change the AI model, and in VS Code and JetBrains you can select a custom agent for a specific kind of work.
GitHub notes that each prompt you enter in agent mode consumes GitHub AI Credits; see our Copilot pricing page for plan details.
Extending it with MCP servers
Much of what agent mode can do comes from the tools it can call. Add Model Context Protocol servers to give it tools for external systems, or the GitHub MCP Server to work with GitHub from your editor.
Tips
- Keep command approvals on until you trust a workflow; only allow automatic runs for commands you would run yourself without looking.
- Start big changes in plan mode so you can correct the approach before files change.
- Agent mode works on your local files, so commit before a large task and review the diff afterwards.
Next steps
Verified MCP servers for Copilot
Generate an MCP config for Copilot
GitHub Copilot hub
Claude Code vs GitHub Copilot: documented features compared
Cursor vs GitHub Copilot: documented features compared
How to add an MCP server to Codex
How to add an MCP server to Cursor
How to add an MCP server to GitHub Copilot in VS Code
How to add an MCP server to Google Antigravity
How to migrate from Gemini CLI to Antigravity CLI
Portable agent skills: one SKILL.md for every coding agent
Safe “always allow” rules for Claude Code and Codex CLI
GitHub Copilot CLI yolo mode: --allow-all and safer tool rules
Codex sandbox modes and approval policies explained
How to install Claude Code on macOS, Linux and Windows
How to install the OpenAI Codex CLI
Claude Code auto mode: what runs, what gets blocked, how to turn it off
Agent Skills moves to the Agentic AI Foundation: what changes
MCP security: the risks in MCP servers and how to lock them down
Claude Code in VS Code: install, shortcuts and CLI differences
What is AGENTS.md? The open instruction file for coding agents
Claude Code on Windows: native, WSL and common errors
Codex skills: create, install and use SKILL.md skills in Codex
GitHub Copilot CLI: install, sign in and start using it
Cursor Agent SDK: build, test and deploy agents as code
GPT-6.1 Terra in Codex and the API: setup, pricing and limits
MCP OAuth: connect a remote MCP server in Claude Code, Codex and Cursor
Codex config.toml: location, precedence and the settings to change
Codex on Windows: native sandbox setup, WSL and fixes
Antigravity CLI (agy): install, sign in, modes and commands
Google Antigravity on Windows: install, WSL, sandbox and fixes
GitHub Copilot coding agent (now cloud agent): how to use it
GitHub Copilot coding agent (now cloud agent)
How to add an MCP server to GitHub Copilot
GitHub Copilot CLI: install, sign in and start using it
GitHub Copilot pricing
GitHub Copilot
Frequently asked questions
Open Copilot Chat and choose Agent from the agents dropdown at the bottom of the chat view, then submit a prompt.
Sources
- https://docs.github.com/en/copilot/how-tos/copilot-in-your-ide/use-copilot-agents/use-agent-mode · checked 2026-10-30
- https://docs.github.com/en/copilot/how-tos/chat-with-copilot/chat-in-ide · checked 2026-10-30