NEW: Claude Code Security — research preview

Agents

Understanding agent types, built-in agents, and permission levels

Read time: 5 min

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

TypeWhere it runsBest for
LocalYour machine, interactiveIterative work, VS Code tools, MCP servers
Copilot CLIYour machine, backgroundWell-defined tasks while you keep working
CloudGitHub serversCreating PRs, team collaboration, assigning issues
Third-partyProvider (Anthropic/OpenAI)Claude Code, OpenAI Codex workflows

Which Agent Type to Use

TaskUse
Brainstorm or iterate interactivelyLocal agent
Get answers about my codebaseLocal agent (Ask)
Create an implementation planLocal agent (Plan)
Fix test failures, linting errorsLocal agent
Run while I keep workingCopilot CLI or Cloud
Create a PR for team reviewCloud agent
Assign a GitHub issue to an agentCloud agent
Use Anthropic or OpenAI specificallyThird-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

LevelBehavior
Default ApprovalsRead-only and safe tools auto-approved; destructive actions require confirmation
Bypass ApprovalsAll 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:

  1. Select a different agent type from the session type dropdown in the chat input
  2. VS Code creates a new session carrying full conversation history
  3. 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.