Guide
Run Claude Code, Codex and other AI coding agents side by side
Most coding agents now come as a command-line tool: claude (Claude Code), codex (OpenAI Codex CLI), copilot (GitHub Copilot CLI), cursor-agent (Cursor CLI) and gemini (Gemini CLI). Running two or three of them at once is a cheap way to get more done: one agent builds a feature, another writes its tests, a third reviews the diff. It also spreads the work across plans, so one agent's limit does not stop the day.
The problems are the same as with several sessions of one agent, plus one more: every CLI reports its state differently. This guide covers what to set up and what each agent tells you.
1. Keep agents out of each other's files
Agents do not know about each other. Two of them working in one checkout can edit the same file, and the second overwrites the first. Two ways to avoid it:
- Split by area. Give each agent a clear part of the code in its first prompt ("only touch
src/api"). Simple, and enough when tasks do not overlap. - One git worktree per agent.
git worktree add ../app-tests -b testsgives the second agent its own checkout and branch; you merge when it is done. Claude Code can create one itself withclaude --worktree; for the other CLIs, create it first and start the agent inside it.
2. See which agent is waiting
Every agent stops to ask before it runs a command or edits outside what you allowed, and a waiting agent does nothing until you answer. With several terminals, the hard part is noticing. Agents differ in what they report to other tools through hooks (commands the CLI runs at points such as "prompt submitted" or "turn finished"):
| Agent | Reports through hooks | What that means side by side |
|---|---|---|
| Claude Code | Prompt, tool use, permission prompt, question, end of turn | A tool can show working, needs you and finished, and even answer permission prompts for it |
| Codex CLI | Prompt, tool use, permission request, end of turn, once you trust the hooks | Working, needs you and finished; Codex asks once whether to trust new hooks |
| Copilot CLI | Prompt, tool use, permission prompt, question, end of turn | Working, needs you and finished, after you trust the folder |
| Cursor CLI | Session start, tool use, session end. In our tests the prompt and end-of-turn hooks did not fire in the terminal | No reliable working or finished state; watch the terminal |
| Gemini CLI | A full set, but only from its settings files | Status needs hooks in your own Gemini settings |
Checked against Claude Code, Codex, Copilot CLI 1.0.98, Cursor CLI 2026.10.16 and Gemini CLI 0.64.0 in October 2026. CLIs change quickly; see each one's hooks documentation.
3. Spread usage across plans
Each agent bills its own account: Claude Code your Claude plan, Codex your ChatGPT plan (or API key), Copilot CLI your Copilot premium requests, Cursor CLI your Cursor plan, Gemini CLI your Google account. Several sessions of one agent share that agent's limits; sessions of different agents do not. When one plan is close to its limit, hand the next task to another agent instead of waiting for the reset. See Claude Code's limits and Codex's limits for where to check each.
4. Give each agent the job it is good at
- One agent writes, another reviews. Ask a second agent to review the first one's diff (
git diff main) before you read it. Different models miss different things. - Same prompt, several agents. For a tricky bug, send one prompt to two agents in separate worktrees and keep the better fix.
- Keep long jobs apart. A test run or a migration in one terminal should not block the agent you are talking to in another.
Doing it in VS Code or Cursor
Separate terminals in tmux or your terminal app work everywhere. VS Code also has its own Agent Sessions view, which lists Copilot, Claude and Codex sessions run through GitHub Copilot's chat; see the VS Code documentation for what your version and plan include.
Paneherd is an extension for the CLIs you already have installed and signed in to. It opens each agent as a real terminal in the editor area, in a grid, with one sidebar for all of them:
- Live status for Claude Code, Codex and Copilot from their own hooks, with a count of panes waiting for you and a jump to the next. Cursor and Gemini panes run without status.
- Broadcast: send one prompt to several panes, of any agent.
- Usage limits for Claude Code and Codex, and Copilot's premium requests once you connect GitHub, at the top of the sidebar.
- Restart and resume: a pane restarts into the same conversation, and panes survive Reload Window.
Claude Code panes also get the permission inbox and the conflict guard (Pro). The free version runs up to four panes at once, of any agent, and Pro can be tried free for 7 days.
Next: how to see your Codex usage limits, several Claude Code sessions at once, and how the tools compare.