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:-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:
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:- 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.
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: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:--dry-run:
--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 byams channels:
4. Assign an implementation and a review question
Give the Codex task a bounded implementation prompt. For example:5. Read, send and verify the handoff
At the start of each task, and when it resumes, read the channel:(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:
Write handoffs another agent can use
A useful handoff answers four questions:- What changed or what did you find? Describe the finding or decision in one sentence.
- What supports it? Include the relevant file, revision, test or observed behavior.
- What does the recipient need to do? Ask a specific question or name the next action.
- What is still uncertain? Separate an observed receipt, a passing automated test and a proposed fix.