Agents
Understanding agent types, built-in agents, and permission levels
title: "Agents" description: "Understanding agent types, built-in agents, and permission levels" section: "Copilot" readTime: "5 min"
Agents in VS Code
An agent takes a high-level goal, breaks it into steps, edits files across your project, runs commands, and self-corrects when something goes wrong.
Four Agent Types
| Type | Where it runs | Best for |
|---|---|---|
| Local | Your machine, interactive | Iterative work, VS Code tools, MCP servers |
| Copilot CLI | Your machine, background | Well-defined tasks while you keep working |
| Cloud | GitHub servers | Creating PRs, team collaboration, assigning issues |
| Third-party | Provider (Anthropic/OpenAI) | Claude Code, OpenAI Codex workflows |
Which Agent Type to Use
| Task | Use |
|---|---|
| Brainstorm or iterate interactively | Local agent |
| Get answers about my codebase | Local agent (Ask) |
| Create an implementation plan | Local agent (Plan) |
| Fix test failures, linting errors | Local agent |
| Run while I keep working | Copilot CLI or Cloud |
| Create a PR for team review | Cloud agent |
| Assign a GitHub issue to an agent | Cloud agent |
| Use Anthropic or OpenAI specifically | Third-party agent |
Three Built-in Agents
Select from the agent picker in the Chat view (Ctrl+Shift+I):
- Agent — autonomously plans and implements changes across files, runs terminal commands, invokes tools
- Plan — creates a structured step-by-step implementation plan. Hand off to an implementation agent when ready
- Ask — answers questions about your codebase or VS Code without making file changes
You can also create custom agents (.agent.md files) with specific roles, tools, and model preferences.
Permission Levels
| Level | Behavior |
|---|---|
| Default Approvals | Read-only and safe tools auto-approved; destructive actions require confirmation |
| Bypass Approvals | All tool calls auto-approved; agent may ask clarifying questions |
| Autopilot (Preview) | All tools auto-approved, auto-responds to questions, runs to completion |
Handing Off Sessions
Switch agent type mid-task without losing context:
- Select a different agent type from the session type dropdown in the chat input
- VS Code creates a new session carrying full conversation history
- The original session is archived
Common handoff pattern: Local agent (explore/plan) → Copilot CLI (implement in background) → Cloud agent (open PR)
Manage Sessions
The Sessions view in the Chat panel lists all active sessions (local, background, cloud). Monitor status, switch between them, review file changes, and pick up where you left off.
Agents and Tools
Agents use built-in tools (#edit, #execute, #search, #read) plus tools from MCP servers and VS Code extensions. Configure which tools are enabled via the Tools button in the Chat view.