Why run two different agents
Different CLIs come with different models, defaults and habits, and people find they prefer one for some jobs and another for others. A common setup is one agent writing code while another reviews the diff or investigates a bug in a different part of the repo. Running them together is mostly a matter of keeping their files, instructions and attention separate.
Install and sign in to both
Install each CLI with its own instructions and sign in once in a normal terminal. Claude Code runs as claude and uses your Anthropic login; Codex runs as codex and uses your OpenAI sign-in. Run each one in a project folder before you combine them, so login prompts do not get in the way later.
Share one set of project instructions
Each CLI reads its own instruction file: Claude Code reads CLAUDE.md, and Codex reads AGENTS.md. Keeping two copies in sync is a chore, so keep one:
# AGENTS.md: the real instructions
- Use pnpm, not npm.
- Run `pnpm test` before you say you are done.
- Never edit files under src/generated/.
# CLAUDE.md: one line
@AGENTS.md
Claude Code expands @AGENTS.md into the file's contents, so both agents follow the same rules. Add anything only Claude Code needs below the import.
Split the work
Two agents editing the same files will undo each other's changes. Either give them separate areas, or separate roles:
- Separate areas. Claude Code on the API, Codex on the front end. Give each its own git worktree:
git worktree add ../app-api -b apiandgit worktree add ../app-web -b web. - Writer and reviewer. One agent changes the code; the other only reads it and reports. Tell the reviewer plainly not to edit anything.
Our note Scouts before editors explains why many readers and one writer holds up better than several writers.
Run them side by side
Tabs or tmux
Open one tab per agent, or one tmux window or pane each:
tmux new -s work -n claude # run claude here
tmux split-window -h -t work # run codex in the new pane
The catch is that each CLI asks for approvals in its own format and notifies you in its own way. Claude Code has hooks (see Claude Code notifications on Mac), and Codex has its own notification setting in its config. You end up maintaining two setups and still checking two panes.
herdr
herdr is a free terminal runtime for agents. It keeps each agent's process alive after you close its window, and other tools can read an agent's screen to tell whether it is working, waiting or done, and type answers into it. Install it with:
curl -fsSL https://herdr.dev/install.sh | sh
Cadence uses herdr for every agent that is not Claude Code.
Both agents in one Inbox with Cadence
Cadence is a free macOS app that puts every coding agent in one Inbox. Claude Code is hosted natively. Codex, OpenCode, Pi, Omp, Amp, Grok, Cursor, Copilot and Gemini run through herdr.
Start both agents
- Download Cadence. The
claudeCLI should be installed and signed in, and so shouldcodex. - Open ⋯ → New agent… on the toolbar and pick Codex. If herdr is missing, the view shows the install command; run it and click I installed it, or Start herdr if it is installed but not running.
- Enter the Folder (for example the worktree you made for it) and a First message, then start it.
- Do the same with Claude Code, choosing Terminal or Cadence chat.
With Talk, double-tap ⌥ and say "start a Codex agent in the api folder". New agents use Claude Code unless you name another CLI.
What you get for each
Both agents show up as dots on the toolbar (blue working, amber needs you, green done), with a short title written from what each is doing. Codex questions land in the Inbox the same way Claude Code's do when the CLI prints numbered options, and you answer with 1 to 9.
Claude Code gets more, because Cadence hosts it directly. In Cadence chat mode you get real Allow/Deny cards with your reason passed back on Deny, a git worktree per agent by default, and Diff and History tabs on the Agents board. Other CLIs keep their own interface in a Terminal window.
The Director can read and message agents in herdr by name, so "what is the Codex agent doing?" works across both. Each CLI talks to its own provider under its own account; Cadence does not route that traffic through its servers.
Common questions
Does Cadence need an OpenAI key to run Codex?
No. Codex uses its own sign-in, exactly as it does in a normal terminal. Cadence starts it in the folder you choose and does not manage its account or settings.
Do Codex agents get their own worktree in Cadence?
The automatic worktree per agent applies to Claude Code in Cadence chat mode. For Codex, create a worktree yourself and use it as the agent's Folder.
Can Claude Code and Codex read the same instructions?
Yes. Put the instructions in AGENTS.md and add @AGENTS.md to CLAUDE.md, so Claude Code imports the same file Codex reads.