Claude Code and Codex. Side by side on one Mac.
Separate worktrees, clear task names, a useful needs-you signal, and small reviews: a practical setup for working with both coding agents.
Two coding agents, one clear review
Useful with your current tools. No XAgents installation required.
Before starting a second agent, give each one a task you can review separately. “Fix the app” leaves too much room for overlap. “Find why this test fails and report the cause” is a clearer assignment.
Give each task four boundaries
- Outcome: What result do you want to inspect?
- Scope: Which files or areas may it change? If both tasks need the same files, do them in sequence or use the isolation workflow you already trust.
- Decision point: When should it stop and ask you? Examples: unclear behavior, missing access, an unexpected cost or a change outside scope.
- Finish line: What should the result contain: changed files, the checks actually run, their outcomes and anything still unverified?
Example brief:
Investigate why the settings test fails. Read the related code and tests; do not edit yet. Report the cause with file references and propose the smallest fix. Stop if you need access or cannot reproduce the issue. Distinguish what you observed from what you suspect.
A second, independent task could review a separate help page for unclear instructions. Neither task needs blanket permission to modify everything. Use your own project and provider access; provider limits and costs still apply.
While they work
Use task names you can recognize. Keep questions separate from finished replies. Read a requested action and its scope before approving it. If a task changes materially, update the brief instead of assuming the agent knows your new intent.
Avoid giving two agents independent permission to resolve the same conflict or deploy the same change. Parallel work is useful only when its outputs can be reconciled.
When one says “done”
Ask for these three things:
- What changed: the actual files and behavior, not just a success summary.
- What was checked: the commands/actions that ran and what they established.
- What remains unverified: the paths that were not exercised, unresolved questions and the next human decision.
Inspect the result before accepting it. A passing test is evidence for what that test covers; it is not proof that installation, deployment or the real user flow worked. A finished reply can still need review.
Before you leave
Resolve or record pending questions. Note which task can continue and which should stop. When returning, check current state rather than assuming the last status still applies.
Put the checklist into practice on your Mac
Claude Code and Codex can work on one Mac without taking turns at the same keyboard. The useful setup gives each agent a separate working directory, a named task, and a clear way to ask you for a decision. Start with two small, independent jobs. Parallel work becomes valuable when you can review each result on its own; two agents editing the same unfinished change usually create more coordination than progress.
Choose two jobs with a real boundary
A good first pair is a documentation update and an isolated bug fix. Another is implementation in one worktree and read-only investigation in another. Avoid splitting a tightly coupled schema change between agents unless you have already agreed on the contract. Write down which files each owns and who handles shared files such as package manifests, lockfiles, routing tables, and generated code.
Decide how you will judge success before choosing the provider. For a bug, use a reproducible failing case and the expected result. For documentation, use an executable example and a reader’s task. “Improve the project” gives neither agent a stopping point. A concrete outcome also makes it easier to notice when both agents are independently solving the same problem.
Create a worktree for each editing task
From a clean checkout of the repository, inspect your starting point and create two branches in sibling directories. These names are examples; choose names that describe your own tasks. Both commands below start from the same current commit:
git status --short
git branch --show-current
git rev-parse HEAD
git worktree add ../app-reset -b fix/reset-link HEAD
git worktree add ../app-docs -b feat/setup-guide HEAD
git worktree listIf the first command shows unfinished work, stop and decide which commit should be the common base. Uncommitted changes in your original directory do not appear in the new worktrees. Git’s worktree documentation explains how linked working trees share a repository while keeping separate working files and indexes. Git normally prevents checking out the same branch in two worktrees; keep that protection.
Worktrees isolate source files, not your whole machine. A database, cache directory, container name, or listening port can still be shared. Give each dev server a distinct port and each write-heavy test a disposable test database. If you cannot isolate a migration safely, let only one task run it. Never assume a new folder makes a command against a remote service harmless.
Launch each tool in the right folder
First confirm both commands are installed with claude --version and codex --version. Use each tool’s normal sign-in flow with your own account. Run the project’s documented dependency setup in each worktree. For an npm project with a committed lockfile, that is often npm ci; another repository may use a different package manager. Do not silently regenerate a lockfile to make setup succeed.
In the first terminal:
cd ../app-reset
claude --name reset-linkFrom the original checkout in a second terminal:
codex -C ../app-docsThose launch options are supported by the CLI versions checked for this guide; use --help to inspect yours. Configure required local settings separately. Gitignored environment files are not automatically copied by these Git commands. Prefer a documented example environment, and copy only the values the task is allowed to use. A docs task rarely needs production credentials.
Name the work, then give each agent a brief
Name windows or tabs after outcomes: “reset link” and “setup guide” are easier to recover than “Claude 2” and “Codex 3”. Include the branch and working directory in your tracking note. A title is a convenience; confirm the actual path with pwd and Git before a consequential command. For each agent, provide a brief like this:
Goal: document local setup from a fresh checkout.
Own: docs/setup.md only.
Verify: execute the documented steps in a disposable environment.
Ask me: if a command needs credentials or shared-service changes.
Finish with: changed files, exact checks, failures, and remaining gaps.Tell an investigator explicitly whether it may edit files. Tell an implementer which commands count as acceptance checks. If an agent discovers a needed change outside its area, have it report the dependency before touching the other agent’s files. This small agreement saves you from merging two competing fixes to the same configuration later.
Give blocked work a clear “needs you” signal
Ask each agent to pause with one specific question when it needs a decision: what is uncertain, what it already checked, and which choice unblocks the next step. “Should expired links show the existing error page or a new screen?” is actionable. “Need clarification” makes you reconstruct the task. Keep working, blocked, and finished distinct, and do not treat a process that stopped printing as proof it finished.
In a terminal-only setup, use descriptive tab names and a short status note that you check at natural breaks. XAgents puts projects in spaces and agents in tabs, with a Needs you signal when an agent is waiting. The signal helps you find the question; you still need to inspect the request and decide whether the proposed action is appropriate.
Choose Claude or Codex from evidence on your task
There is no permanent rule that one provider should plan and the other should code. Start with the tool that already has useful context or the integration the job requires. Use the other for a genuinely independent task, a fresh review, or a continuation when access is constrained. Compare the quality of the diff, the checks actually run, the questions asked, and the effort you spend reviewing. Keep model, task, and acceptance criteria in your notes.
A second opinion is useful when it checks evidence independently. Ask the reviewer to inspect the changed code and reproduce the failure, rather than merely approving the first agent’s summary. Different providers can still make the same mistake. For a provider change on the same task, use the handoff checklist and stop the previous writer before the next one starts.
Review and integrate one result at a time
Inspect each branch’s diff, including tests and setup files, then run its checks. Land the smaller foundational change first through your normal review process. Update the remaining candidate against the new base and rerun affected checks before combining it. A clean merge says the text fits together; it does not prove the behaviors still agree. Our test-verification guide explains what evidence to ask for.
Stagger expensive builds if the Mac becomes sluggish. Track the dev servers you started and stop only those processes when finished. Once work is safely merged and no agent is using its folder, remove that worktree with git worktree remove ../app-docs. Git refuses ordinary removal when it would discard uncommitted changes; inspect the problem rather than adding force. Keep the branch until you have confirmed the work is preserved.