Claude Code vs GitHub Copilot Agent Mode: How They Handle Tasks

Two agents that take a coding task and work through it with tools. Where each runs, how it reads your standing instructions, how it reaches other tools, how you approve and undo its work, and how each runs several tasks at once.

Updated 7 min read

Claude Code and GitHub Copilot’s agent mode do the same core job: you describe a task, and the agent reads code, edits files, runs commands and tests, and keeps going until it is done or stuck. The differences are structural. Claude Code is Anthropic’s agent and runs wherever you start it — a terminal, an editor, the desktop app or the web. Copilot’s agent works inside VS Code and GitHub, and VS Code can now run several agent harnesses side by side, Claude among them. Pick by where you want the work to happen and how you want to approve it, not by a feature list; the feature lists are converging.

Where each one runs

Claude Code started as a command-line tool and, according to Anthropic’s overview (opens in a new tab), now runs in the terminal, in IDE extensions, in a desktop app and on the web. The terminal is still its home: sessions, permissions and settings are the same whichever surface you use, and the same claude command drives scripts and CI.

Copilot’s agent lives in the editor. In VS Code you give it a task in the Chat view beside your code, or in the Agents window, which is built for handing out several tasks and reviewing results. VS Code’s page on agent harnesses (opens in a new tab) lists Local, Copilot, Claude and Codex harnesses, plus a Cloud target that runs a cloud agent remotely and returns a pull request. So “Claude Code or Copilot” is sometimes a false choice: inside VS Code, a session can run on the Claude harness.

How each takes a task

The loop is the same in both: gather context, act, check the result, revise. What differs is the shape around it.

  • Claude Code: you type the task at a prompt. For anything large, plan mode lets it read and propose without editing until you accept the plan. It works in your current checkout unless you start it in a worktree.
  • Copilot in VS Code: you pick Agent in the chat input and type the task, or pick Plan where it is available to review an approach first. Each task is a session, which keeps its context and changes together so you can come back to it.
  • Both accept a follow-up while they work, and both can be stopped mid-task. Stopping does not undo what has already been done.

For writing the task itself, the same rules help both; see how to write a task for an AI agent.

Standing instructions

Claude Code reads CLAUDE.md files at the start of a session: your personal one, the project’s, and those in directories above. Its memory documentation (opens in a new tab) now says it also reads AGENTS.md as project instructions when there is no CLAUDE.md in the working directory or above it; with both present it reads CLAUDE.md only, unless CLAUDE.md imports the other file or you change the setting.

Copilot reads .github/copilot-instructions.md or AGENTS.md for the whole project, and *.instructions.md files under .github/instructions whose applyTo pattern matches the files being changed. VS Code’s custom instructions page (opens in a new tab) adds that a session on the Claude harness reads CLAUDE.md and .claude/rules, so the harness you pick decides which file counts.

If you use both, the least effort is one AGENTS.md with the shared rules, and a short CLAUDE.md that imports it plus anything Claude-specific. Which Copilot surfaces read which file is covered in does GitHub Copilot support AGENTS.md?

Tools and MCP

Both reach outside the codebase through the Model Context Protocol. In Claude Code, claude mcp add registers a server for you alone by default; add --scope project and it goes in a .mcp.json that everyone who clones the repository shares. In VS Code, servers go in .vscode/mcp.json for the workspace or in your user profile, and VS Code also reads a portable .mcp.json at the project root that other tools understand. A remote server that signs in with OAuth works the same way in both: you approve it once in the browser.

The same board, two tools
# Claude Code
claude mcp add --transport http fenbs https://fenbs.ai/api/mcp

# VS Code: .vscode/mcp.json
{ "servers": { "fenbs": { "type": "http", "url": "https://fenbs.ai/api/mcp" } } }

Both also package know-how you would otherwise repeat in every prompt. Claude Code has skills, subagents and plugins; VS Code offers agent skills and plugins that bundle tools and workflows. In Claude Code, hooks are the way to make a rule unconditional rather than a request, for example reminding the agent to update the board after every commit; see Claude Code hooks. Copilot has them too: Copilot CLI and the Copilot cloud agent run documented hooks (opens in a new tab), and VS Code’s are in Preview; see GitHub Copilot hooks.

Approval and undo

Claude Code sets approval with a permission mode, switched with Shift+Tab in the terminal. Its permission modes (opens in a new tab) run from Manual, which asks before most edits and commands, through acceptEdits and plan, to auto, which approves with background safety checks, and bypassPermissions, meant for isolated containers only. From v2.1.283, auto mode is the built-in starting mode for interactive terminal and VS Code sessions. Allow and deny rules sit on top of whichever mode is on, and deny rules hold in every mode. Every prompt creates a checkpoint, and /rewind takes the files back to one.

VS Code puts the same controls in the chat input. Its approvals page (opens in a new tab) describes Manual permissions, which follow your tool, URL and terminal approval settings; Assisted permissions, where a model judges each call; and Allow all. Autopilot is a separate mode that approves every tool and works until it judges the task complete. Checkpoints are on by default: review the diff, and restore a checkpoint or discard the changes before you commit. Sandboxing, where it is enabled, limits what approved terminal commands can reach.

Running several tasks at once

  • Claude Code: start each session in its own git worktree with claude --worktree <name>, so parallel sessions do not edit the same files. Subagents split work inside one session. The detail is in running Claude Code tasks in parallel.
  • Copilot in VS Code: start several sessions; each keeps running when you switch away. In the Agents window, New Worktree gives a session its own worktree from committed state, and those sessions run with Allow all.
  • Remote work: Copilot’s cloud agent takes an issue and returns a pull request, covered in the GitHub Copilot coding agent. Claude Code has a GitHub Action that answers @claude in an issue or pull request, and cloud sessions you can start from the terminal or the web.

Which fits which way of working

  • You live in the terminal, script your tools, or want the same agent in CI: Claude Code.
  • You live in VS Code and want the agent, the diff and the debugger in one window: Copilot agent mode, with the Claude harness available there if you prefer Claude’s way of working.
  • Your team reviews everything as pull requests on GitHub: either, through Copilot’s cloud agent or Claude Code’s GitHub Action.
  • You use both: share one AGENTS.md, one MCP configuration, and one list of work.

One list of work for both

Whichever agent does a task, the task itself should not live in that agent’s chat. A session list in VS Code and a transcript in Claude Code are each visible only to the tool that made them. Put the work on a board both can reach over MCP and each can update. On fenbs, both connect to the same address, each holds a role, and the history records which assistant made each change, so a morning’s work from two agents reads as one list. Tips for keeping Copilot’s side tidy are in GitHub Copilot agent mode best practices.

Related

Set-up pages: Claude Code and GitHub Copilot. For the board routine in CLAUDE.md, see a task-tracking workflow for Claude Code.

Questions people ask.

Can I use Claude inside GitHub Copilot?

In VS Code, yes: the agent harness picker includes a Claude harness alongside Copilot, Codex and Local, and a session on it reads CLAUDE.md. What is available depends on your account and your organisation’s policies.

Do Claude Code and Copilot read the same instructions file?

They can. Copilot reads AGENTS.md or .github/copilot-instructions.md. Claude Code reads CLAUDE.md, and reads AGENTS.md when there is no CLAUDE.md. A CLAUDE.md that imports AGENTS.md gives both the same rules.

Which one is safer to leave running?

Neither is safe by default in an unattended mode. Both have modes that skip approval, and both recommend them only in isolated or trusted environments. Keep deny rules for what must never happen, and give the agent the narrowest access to outside tools that still lets it work.

Start with one thing.

There is nothing to set up first. Write one line and you’ve started.