VS Code Multi-Agent Setup: Claude, Codex and Copilot
VS Code can run Claude, Codex and Copilot agents in the same editor, each in its own session. Microsoft called VS Code the "home for multi-agent development" in the 1.109 release on February 4, 2026. Since then the setup has grown an Agents window and a background Agent Host. This guide shows how to run several agents in parallel today, including more than one Codex session. It also covers what you give up when you switch harness, starting with memory.
What is VS Code multi-agent development, in one sentence?
VS Code multi-agent development means running several agent sessions at once from one editor, each on a harness you pick, and reviewing their work in one place.
A harness is the runtime that drives the agent. The harness docs list four: Copilot, Local, Claude and Codex. The model is a separate choice. Selecting a model changes the model inside the current harness. It does not switch harness.
How do the Copilot, Claude and Codex harnesses differ?
| Copilot | Claude | Codex | Local | |
|---|---|---|---|---|
| Built on | Copilot SDK, via the Agent Host | Anthropic's Claude Agent SDK | OpenAI Codex extension, or an experimental Agent Host integration | VS Code's built-in harness in the extension host |
| Keeps running after you close the window | Yes | Not stated in the docs | Not stated in the docs | No |
| What you need | GitHub Copilot | Copilot subscription, or your own Claude API key | The extension, or Copilot Pro+ or a ChatGPT account for the Agent Host | Models configured in VS Code |
| Can hand off to another harness | No | No | No | Yes, to Copilot, Claude or Codex |
| Memory it uses | Copilot Memory (GitHub cloud) | Claude's own files, such as CLAUDE.md | Codex's own files, such as AGENTS.md | Local memory files |
Sources: VS Code's harness docs and memory docs. The memory row also draws on Anthropic's Claude Code memory docs and OpenAI's AGENTS.md guide. The last row is our reading of those pages. VS Code's memory page covers only the Copilot and Local harnesses.
The docs also warn that harnesses differ in tools and hook support. Copilot harness sessions do not get every built-in or extension tool. Check a workflow before you move it from one harness to another.
How do you run multiple agents in parallel in VS Code?
Use the Agents window. Per the Agents window docs, it is a separate VS Code window for assigning tasks and watching several sessions. Open it from the Open in Agents button in the title bar, the Chat: Open Agents window command, or code --agents in a terminal.
Then, for each task:
- Start a new session and pick the harness with the Session Target control before your first prompt. The control only shows harnesses whose requirements you meet.
- Choose New Worktree for parallel work, or Folder for a small task that needs your uncommitted files.
- Arrange sessions in a grid to compare them. The sessions list shows each session's status and change statistics as it works.
- Answer approval requests as they appear. Review each result before you merge it.
The docs warn that sessions using the same folder can edit the same files. A new worktree starts from committed Git state, so uncommitted and untracked files do not come along. Worktrees separate changes only. They do not limit commands or network access.
Can you run several Codex agents at once in VS Code?
Yes. Each Codex session is a separate session in the Agents window, so you can start two or more on separate worktrees. You need the Codex harness first. The harness docs give two routes: install the OpenAI Codex extension from the marketplace, or use the experimental Agent Host integration. The Agent Host route needs a Copilot Pro+ subscription or a ChatGPT account, and per the docs a free ChatGPT account is enough.
Inside one session, an agent can also split work across subagents. The 1.109 notes say subagents "can now run in parallel" for independent pieces of a task. Subagents stay inside one harness. To run Claude next to Codex, you coordinate the sessions yourself.
What changed since February 2026?
The 1.109 release in February introduced the Claude agent as a preview inside a Copilot subscription. It also added an Agent Sessions view for tracking sessions that run locally or in the cloud. The current docs describe a bigger setup. Claude can now run on your own API key, and Codex can run without the extension. The Agents window also opens in a browser at insiders.vscode.dev/agents.
VS Code 1.144, released October 28, 2026, adds the Agent Host. It is a separate process that keeps sessions running when the editor is closed. Cloud sessions are still marked experimental, so treat them as subject to change.
Read the fine print
Handoffs go one way. A Local session can hand its conversation to any of the other three harnesses. Sessions on those harnesses cannot hand off to another harness or to a cloud session. Certain enterprise-managed settings also turn off the Claude and Codex harnesses entirely.
Memory does not cross harnesses. Copilot Memory is a GitHub cloud service that Copilot CLI and the Copilot cloud agent also use. The memory docs do not say it reaches Claude or Codex sessions. Claude loads CLAUDE.md files and its own auto memory. Codex reads AGENTS.md files, up to 32 KiB combined by default. So a build quirk Copilot learned has to be learned again by Codex, or written into a file both harnesses read.
The bottom line
For parallel work, give each task its own session in the Agents window on a fresh worktree. Pick the harness per task after checking that the tools you rely on exist in it. Keep shared project rules in files every harness reads, and expect each harness to forget what another one learned.
How do you share memory between Claude and Codex agents in VS Code?
The multi-agent editor still has one memory per harness. Copilot keeps its facts on GitHub. Claude and Codex each read their own instruction files and keep their own notes. When you run them side by side on one codebase, each agent rediscovers the build command and the test quirks the others already found.
memU puts one memory backend behind several hosts, including Codex and Claude Code. Each host adapter does two jobs. A scheduled background task slices new session logs into jobs that the agent distills into Markdown memory and skills. A standing instruction in CLAUDE.md or AGENTS.md then tells the agent to retrieve before it answers.
memU makes no LLM calls itself. The agent decides what to keep and memU stores it for later retrieval. What a Codex session learned is then available to Claude Code. On the OpenAI side, memU's README lists the Codex VS Code extension on macOS and Windows. Copilot is not on its list of supported hosts, so check the support matrix before you rely on it in a given harness.
The hosted version is free and syncs across devices. Get an API key from memu.so and send your agent one message (the source is on GitHub):
Read https://memu.pro/SKILL.md, follow its instructions to install and configure memU, API Key is
YOUR_MEMU_API_KEY.
FAQ
Can I use Claude in VS Code without a Copilot plan?
Yes. The Claude harness accepts your own Claude API key, billed by your provider. The docs mark that option, without GitHub sign-in, as experimental.
How do I run multiple Codex agents in VS Code?
Install the Codex harness through the OpenAI extension or the Agent Host. Then start one session per task in the Agents window, each on its own worktree.
Do VS Code agents share memory?
Not across harnesses. Copilot Memory serves Copilot features and the Local harness keeps local memory files. Claude and Codex read their own files.
Can agents in parallel sessions overwrite each other's files?
Yes, if they share a folder. Use a separate Git worktree for each parallel session.
What is the Agents window in VS Code?
It is a dedicated VS Code window for starting agent sessions across projects and reviewing their results. You can open it with code --agents.