Skip to content
Core feature · 03Verified 2 Nov 2026

Agents, Copilot Edits & multi-file changes

Agents plan, edit many files, run commands, read the results and iterate — in your editor, in the background, or in the cloud as Copilot coding agent. You stay in control with checkpoints, approvals and per-file review.

Built-in agents

Pick an agent from the dropdown in the chat input. Each has a different tool set and autonomy level.

read-only

Ask

Answers questions about code and concepts. Uses read-only tools to search the workspace. Nothing changes on disk.

read-only

Plan

Researches the task and drafts a step-by-step implementation plan you can edit, then hand off to Agent to build it.

default

Agent

Autonomous: finds files, edits across the codebase, runs terminal commands and tests, reads errors and iterates until done.

legacy

Edit

The Copilot Edits experience: you choose the working set of files, it proposes multi-file edits, you review and keep or undo. Agent mode superseded it as the default.

  1. 1

    Plan

    Use the Plan agent or /plan. Review the plan; answer its clarifying questions.

  2. 2

    Implement

    Hand off to Agent. It reads files, creates and edits code across the project.

  3. 3

    Verify

    It runs builds, linters and tests, reads failures and fixes them — an automated refactoring loop.

  4. 4

    Review

    Inspect the multi-file diff. Keep or undo per file, or restore a checkpoint.

Reviewing a multi-file agent session

Try it: switch files, then Keep or Undo each one — this is how VS Code lets you accept agent edits granularly.

Agent session · 3 files changed Checkpoint 2 of 2

Agent log

  1. Read src/api/routes.ts, src/lib/redis.ts
  2. Created src/middleware/rate-limit.ts
  3. Edited src/api/routes.ts
  4. Ran npm test -- api → 1 failed
  5. Fixed missing Retry-After header
  6. Ran npm test -- api → 43 passed
src/middleware/rate-limit.ts
+import { RateLimiterRedis } from "rate-limiter-flexible";
+import { redis } from "../lib/redis";
+
+const limiter = new RateLimiterRedis({ storeClient: redis, points: 100, duration: 60 });
+
+export async function rateLimit(req, res, next) {
+ const key = req.get("x-api-key") ?? req.ip;
+ try {
+ await limiter.consume(key);
+ next();
+ } catch (r) {
+ res.set("Retry-After", String(Math.ceil(r.msBeforeNext / 1000)));
+ res.status(429).json({ error: "rate_limited" });
+ }
+}

Checkpoints

Each request creates a checkpoint of the files the agent changes. Restore one to roll back every edit made after it, then re-prompt. Combine with Git commits for durable history.

Permission levels

  • Default approvals: Asks before running terminal commands, editing sensitive files or calling tools that aren't pre-approved.
  • Bypass approvals: Auto-approves tool calls in the session; it may still ask clarifying questions.
  • Autopilot (preview): Approves everything and keeps going until the task is complete. Use in sandboxes, worktrees or containers.

Steer, don't restart

You can send a follow-up while the agent is running to change direction. Use subagents for isolated research so the main context stays small, and run /compact when a long session gets noisy.

Where agents run

Same agent, three execution environments — pick based on how much you need to interact.

Local (VS Code)

Runs in your editor with your workspace, extensions and terminal. Interactive — you can steer mid-run.

Background / Copilot CLI

Runs on your machine in the background, optionally in an isolated Git worktree so it doesn't touch your working copy. Monitor from the Sessions view.

Cloud (Copilot coding agent)

Runs on GitHub Actions. Works from an issue or prompt, pushes to a copilot/* branch and opens a draft pull request for review.

Copilot coding agent (issue → pull request)

Assign an issue to Copilot and it works autonomously in an ephemeral GitHub Actions environment, then requests your review.

  • Assign from GitHub.com, GitHub Mobile, VS Code, the Agents panel, Copilot CLI, or via the GitHub MCP server.
  • It creates a copilot/* branch, commits as it goes and keeps a draft PR description updated with a checklist.
  • Comment on the PR mentioning @copilot to request changes; it picks them up and pushes new commits.
  • Pre-install dependencies with .github/workflows/copilot-setup-steps.yml so it can build and test fast.
  • It follows your custom instructions, AGENTS.md, custom agents, skills and MCP configuration.
.github/workflows/copilot-setup-steps.yml
name: "Copilot Setup Steps"
on: workflow_dispatch
jobs:
  copilot-setup-steps:   # job name must be exactly this
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-node@v4
        with: { node-version: "22", cache: "npm" }
      - run: npm ci

Copilot code review

Request Copilot as a reviewer on a pull request (or review uncommitted changes in your IDE). It leaves comments with suggested fixes you can apply in one click.

Pair it with a human reviewer

Copilot review is a fast first pass for bugs, security issues and style. Keep a human approval for design and product decisions — see the two-layer review workflow on the ecosystem page.