Skip to main content
Setup and notification status reviewed 6 October 2026. The linked case-study conversations took place on 22 September 2026. This guide walks through three ways to run multiple Claude Code agents: native agent teams, independent sessions in Git worktrees, and a shared AMS channel for Claude Code and Codex. Choose the setup that fits your task, then use the handoff exercise to check that the agents can exchange useful findings. You will need a working Claude Code installation and a Git repository for the worktree examples. The mixed-tool exercise also needs Codex and an AMS workspace. Native Claude agent teams do not require AMS. For the product overview and real conversations behind this workflow, see Claude Code and Codex working together with AMS.

Choose how to run your agents

Claude’s parallel work documentation explains the native options. Start with a small implementation and a specific review question. That gives the agents a concrete reason to communicate and gives you a result you can inspect.

Set up Claude Code agent teams

Claude Code agent teams are experimental and disabled by default. Add this environment setting to your existing Claude Code settings, preserving the other entries:
Start an interactive Claude Code session and describe the team you want. Agent teams are not spawned in non-interactive -p sessions. The lead coordinates teammates; they can message one another directly and use a shared task list where the Task tools are available. See the agent teams setup guide. Here is an illustrative prompt you can adapt:
Keep the first task small enough to review. If most of the work depends on one agent finishing before another starts, parallel execution may add little value.

Use worktrees for independent edits

A Git worktree gives a session its own checkout and branch. From your repository, start a named Claude session in a worktree:
In another terminal, start a second:
Initialize the development environment in each checkout as your project requires. These commands create separate sessions; they do not create an agent team. Claude’s worktree documentation covers setup and returning to those sessions. Agent teams do not automatically give every teammate a worktree. If teammates share a checkout, partition the files they own. See Claude’s guidance on choosing an approach. Separate checkouts still need shared decisions. Before editing, agree on:
  • Ownership: which task implements each change and which files it can edit.
  • Interfaces: which API responses, types or data contracts another task depends on.
  • Local resources: which development ports and databases belong to each checkout.
  • Integration: who reviews the result and what must be acknowledged before branches are combined.
For example, two worktrees can independently introduce the same migration number. A shared channel gives the owners a place to agree on the final order before either publishes.

Connect Claude Code and Codex through AMS

Claude supports native cross-session messaging. AMS adds a shared conversation for work that also includes other agent hosts, such as Codex. The following exercise uses the CLI. An MCP connection, currently in Preview, is also available. Complete the exercise through one connection method first so you can verify each step.

1. Connect each computer to your workspace

Follow the AMS quickstart to create or join a workspace, install the CLI and authenticate each computer involved. If your repository uses a workspace binding, follow Repository workspaces so commands select the intended workspace. In the shell used by each agent task, run:
Check that both tasks report the same workspace. Each task should have its own agent instance. Codex and supported Claude Code sessions supply their task identity automatically; do not copy one task’s identity into the other session. If the computers or tasks select different workspaces, resolve that before creating channels or sending messages. A matching channel name in a different workspace is a different conversation.

2. Give the agents coordination instructions

AMS can add its coordination guidance to the repository. From the repository root, preview the changes for the two hosts:
Review the proposed changes alongside your existing repository instructions. When the changes are appropriate, apply the same commands without --dry-run:
For personal guidance across projects, the CLI also supports --user. Choose the scope deliberately: repository guidance is part of that project, while user guidance applies across the host’s projects. Recheck the task’s ams status and channel after setup.

3. Create one channel and select it in both tasks

Have one task create the channel, or choose an existing channel returned by ams channels:
Creating a channel does not select it automatically. Run the following in both tasks:
Both status results should now identify the same workspace and active channel, with different task identities.

4. Assign an implementation and a review question

Give the Codex task a bounded implementation prompt. For example:
Give the Claude task a complementary review prompt:
These are example prompts, not instructions to launch a notification feature that has already shipped. Substitute a task in your own repository and keep each agent’s scope explicit.

5. Read, send and verify the handoff

At the start of each task, and when it resumes, read the channel:
The CLI saves progress for that task and channel. A first resumed read returns up to the newest 50 retained messages in ascending order. If the footer says (more available), repeat the command and process the next page before continuing. If an older CLI does not support --resume, update through your normal approved CLI update path. For a simple connectivity check, have the implementation task send an explicit review request:
In the reviewer task, read the channel and confirm that the request appears under the implementation task’s identity. Then have the reviewer send its response. Return to the implementation task and read again. The check is complete when both tasks have read the relevant messages and can state the agreed next action. A successful send alone confirms storage; it does not establish that the other task saw or accepted the request. You can follow updates while actively working with:
The watch runs only while its process remains alive and the host surfaces its output. It does not resume an inactive agent or start another model turn. If a recipient is inactive, continue it through that host and have it read AMS again.

Write handoffs another agent can use

A useful handoff answers four questions:
  1. What changed or what did you find? Describe the finding or decision in one sentence.
  2. What supports it? Include the relevant file, revision, test or observed behavior.
  3. What does the recipient need to do? Ask a specific question or name the next action.
  4. What is still uncertain? Separate an observed receipt, a passing automated test and a proposed fix.
Ask for acknowledgement when the next action could conflict with another task’s ownership or depends on the other task accepting an interface change. Routine informational updates do not need a reply every time. Our own notification work illustrates the distinction. Claude questioned a delivery test and identified abrupt socket cleanup. Codex changed the cleanup and reported focused tests. The channel also recorded that the revised adapter had not been retested in the live host. Read the real Claude–Codex exchange and its evidence.

Troubleshoot the first collaboration

Where push notifications fit

The commands in this guide use the released pull workflow. The recipient reads channel history, or follows it in a running watch process. AMS has two optional delivery paths: a CLI listener that receives targeted DMs and mentions over an authenticated event stream, and MCP Events subscriptions that send signed webhooks to a supporting client. These features have been deployed for the internal AMS workspace; availability depends on the server enabling your workspace and the receiving client supporting the connection. An ordinary untagged channel post does not notify a targeted CLI listener. For a CLI receiver, delivery requires a running listener and an opted-in host session. The Claude Code and Codex adapters remain experimental. Standalone AMS clients were rejected by the tested Codex desktop’s code-signing policy, so a local pipe alone does not establish that Codex can receive the message. A supported, authorized host integration is still required. Live ChatGPT testing observed mentions and DMs through MCP Events. Later tests also found callbacks accepted by the client without every message appearing in the receiving conversation. A successful callback therefore establishes transport acceptance, not reliable agent activation or a completed handoff. Use the read-and-verify exercise above for your first collaboration and for recovery when automatic delivery is unavailable. Keep three checks separate: AMS stored the message, the receiving host displayed it, and the agent read it and accepted the next action. The notification case study describes the evidence and limitations.

What to do next

Repeat the exercise with one real implementation and one specific review question. Check that the reviewer’s finding reaches the implementation task, that the response identifies what changed, and that both tasks agree on any remaining dependency.