BlogParallel agents

Can I run Codex CLI and Claude Code side by side?

Yes. Run each agent in its own terminal and its own git worktree, so Codex and Claude Code never edit the same checkout. Share project instructions through one AGENTS.md, and turn on each CLI's notifications so you know when either one is waiting. The two tools don't know about each other. The setup is the same layout twice, plus a little config on each side.

Step 1: one worktree per agent

Plain git works for both agents:

git worktree add ../app-search -b codex/search
git worktree add ../app-auth -b claude/auth

Git refuses to check out a branch that another worktree already has, so each agent ends up on its own branch.

Both CLIs can also create worktrees for you:

  • Claude Code: claude --worktree auth creates .claude/worktrees/auth/ on a branch named worktree-auth.
  • Codex CLI: type /worktree in the TUI to start a new chat, or move the current one, into a managed Git worktree. For scripted runs, codex exec --worktree "implement the next step".

Each worktree is a fresh checkout. Install dependencies and copy any gitignored files like .env before the agent needs them.

Step 2: one terminal tab per agent

# tab 1
cd ../app-search && codex

# tab 2
cd ../app-auth && claude

Name the tabs after the task, not the tool. When you have four tabs, "search" and "auth" tell you more than "codex" and "claude".

Step 3: one instructions file for both

Codex reads AGENTS.md before doing any work, from the project root down to the current directory, plus ~/.codex/AGENTS.md. Claude Code reads CLAUDE.md, and from v2.1.277 reads AGENTS.md directly when there's no CLAUDE.md above the working directory. If you keep a CLAUDE.md, start it with an import:

@AGENTS.md

## Claude-specific
- Use /code-review before you say a task is done.

If you already have Codex configuration, Claude Code's /init notices it and offers to carry it over with /import. More in keeping notes your agents can read.

Step 4: know when either one waits

Codex CLI. The TUI can emit terminal notifications for specific events. In ~/.codex/config.toml:

[tui]
notifications = ["agent-turn-complete", "approval-requested"]
notification_method = "auto"
notification_condition = "unfocused"

In auto, Codex prefers OSC 9, an escape sequence some terminals turn into a desktop notification, and falls back to the terminal bell. To run your own program when a turn completes, use notify:

notify = ["python3", "/path/to/notify.py"]

notify currently fires only on agent-turn-complete. For approvals, Codex also has hooks, including PermissionRequest and Stop, configured in ~/.codex/hooks.json or <repo>/.codex/hooks.json. Codex skips a new or changed hook until you review and trust it with /hooks.

Claude Code. Use hooks too: PermissionRequest and Stop, and a PreToolUse hook with the matcher AskUserQuestion for questions. See getting a macOS notification when Claude Code finishes for working examples.

Step 5: review across tools

Both CLIs have a /diff command for the working tree. Each can also review the other's branch:

  • In Claude Code: /code-review main...codex/search
  • In Codex: /review reviews the working tree of the session you run it in.

A second model reading the first one's diff catches different mistakes. It still doesn't replace your review. See reviewing several agents' diffs.

Limits of this setup

  • Two dashboards, each blind to the other. Claude Code's agent view (claude agents) lists Claude background sessions. Codex has its own codex agents command center. Neither shows the other tool's sessions.
  • Two notification systems. OSC 9 in one, hooks in the other, two config formats to maintain.
  • Two sets of limits. Each CLI draws on its own provider account. Check Claude Code with /usage and Codex with /status, separately.
  • Subagents multiply the picture. Both tools can spawn subagents inside a session, and those don't appear as separate tabs.
  • Same-file conflicts still happen at merge time. Worktrees keep checkouts apart, not tasks.

With Kanbell

Kanbell is a macOS app (Apple Silicon) with one window per project and real terminals in panes and tabs. You run codex and claude in them exactly as above. Kanbell then tracks both:

  • Claude Code: working, waiting or done, whether it waits on a question or a permission, a map of agents and subagents, and your subscription usage for the session and the week.
  • Codex CLI: working, waiting or done, waits for permission, and usage read locally on your Mac. There is no subagent tree for Codex yet.
  • Both: an orange dot in the window, the menu bar and the overview when either one waits, a macOS notification, and ⌘⇧J to jump to the next waiting agent.

The Git panel next to the terminals shows changes, diffs, history and worktrees for the project, whichever agent made them. Kanbell has no account and no Kanbell server. Each agent still talks to its own provider.

FAQ

Can Codex and Claude Code work in the same folder?

They can, but they will edit the same files and see each other's half-finished changes. Give each one its own worktree unless both tasks are read-only.

Does Codex CLI support git worktrees?

Yes. /worktree in the Codex TUI starts or continues a chat in a managed Git worktree, and codex exec --worktree does the same for non-interactive runs.

Can Claude Code and Codex share one instructions file?

Yes, AGENTS.md. Codex reads it before doing any work. Claude Code reads it from v2.1.277 when there is no CLAUDE.md, or you add @AGENTS.md to your CLAUDE.md.

Do they share usage limits?

No. Each CLI uses its own provider account and limits. Running both in parallel draws from both.