cd /news/ai-agents/how-to-run-multiple-codex-agents-in-… · home topics ai-agents article
[ARTICLE · art-14503] src=nimbalyst.com pub= topic=ai-agents verified=true sentiment=· neutral

How to Run Multiple Codex Agents in Parallel

OpenAI Codex users can run multiple agents in parallel using git worktrees, terminal multiplexers, or the official Codex desktop app to avoid branch collisions and speed up workflows. The approach allows developers to run separate sessions for refactoring, bug fixes, testing, and scaffolding simultaneously rather than waiting for one agent to finish. Each method has tradeoffs in visibility, cleanup requirements, and approval management.

read7 min publishedMay 14, 2026

Run multiple Codex agents in parallel with git worktrees, the official Codex app, terminal multiplexers, or a kanban workspace. Commands and tradeoffs.

A single Codex agent is fast, but most developers using Codex seriously end up wanting more than one running at the same time. One session refactoring auth, one fixing a bug, one writing tests, one scaffolding a new component. The hard part is keeping them from stepping on each other’s branches, terminals, and approvals.

This guide covers the four practical ways to run multiple OpenAI Codex agents in parallel today, with the actual commands, tradeoffs, and the workflows that hold up past a few sessions.

Why parallel Codex agents matter #

The model is rarely your bottleneck once you have the workflow tuned. Your bottleneck is usually that one Codex session can only execute one stream of work at a time, while you almost always have more than one stream of work to do. Running agents in parallel turns “wait for the agent to finish” into “wait for me to finish reviewing.”

Three patterns where parallel sessions pay off immediately:

Fan-out scaffolding. Spin up three sessions to write tests for three different modules.Long task plus quick wins. Start a long refactor in one session, fire off small bug fixes in others while it runs.Branch isolation. Run sessions on separate branches so one agent’s edits never collide with another’s.

The mechanics differ depending on which harness you use.

Option 1. Git worktrees plus multiple terminals #

The lowest-tech way and the one every other approach builds on. Git worktrees let you check out the same repo into multiple sibling directories, each on its own branch. Each Codex session gets its own working tree, so file edits never collide.

git worktree add ../myapp-feature-auth feature/auth
git worktree add ../myapp-bugfix-login bugfix/login
git worktree add ../myapp-scaffold-tests scaffold/tests

cd ../myapp-feature-auth && codex
cd ../myapp-bugfix-login && codex
cd ../myapp-scaffold-tests && codex

Tradeoffs:

Good: zero new tools. Works with vanilla Codex CLI today.Bad: no shared status view. To check on session 3 you have to switch to that terminal. Approval prompts can pile up unseen in a window you are not looking at.Bad: you are responsible for cleanup.git worktree remove

and merging branches are manual.

This is the right starting point if you want to understand parallelism in Codex before adding any new tooling.

Option 2. Terminal multiplexer (tmux, Zellij, Warp) #

Same worktree pattern, but with a multiplexer keeping all sessions visible in one terminal window.

tmux new-session -d -s codex
tmux split-window -h
tmux split-window -v
tmux select-pane -t 0 && tmux send 'cd ../myapp-feature-auth && codex' Enter
tmux select-pane -t 1 && tmux send 'cd ../myapp-bugfix-login && codex' Enter
tmux select-pane -t 2 && tmux send 'cd ../myapp-scaffold-tests && codex' Enter

Tradeoffs:

Good: you can see all panes at once and switch with a keyboard shortcut.Good: tmux survives a closed terminal, so sessions keep running if your shell crashes.Bad: still terminal-only. Diff review is still raw text.Bad: approval prompts still per-pane.

Tools like Claude Squad take this pattern further by automating the worktree-plus-multiplexer setup. If you live in the terminal, that is a real improvement over hand-rolled tmux.

Option 3. The official Codex desktop app #

OpenAI’s Codex desktop app supports running multiple Codex agents in parallel out of the box, with built-in worktree support and a project-and-thread organization. On macOS and Windows, this is the cleanest first-party option.

What you get:

  • Native parallel sessions inside one app
  • Built-in worktree per thread
  • Diff review and comment threads on changes
  • Shared history with the CLI

What you do not get:

  • Linux support
  • Anything other than Codex (no Claude Code, Gemini, etc.)
  • Visual editors for markdown, mockups, or diagrams
  • A planning surface that the agent can read from and write back to

For Codex-only, single-platform teams, this is often the right answer. It is good software and it is officially supported.

Option 4. A multi-engine visual workspace #

The fourth option is a workspace built around parallel agents from the start. Tools in this category run real Codex (and usually other engines) under the hood, but add a kanban view, per-session diff review, and structured planning around it.

Using Nimbalyst as a Codex workspace as the example:

  • Open the project folder once.
  • Click “New session,” pick Codex as the engine, and optionally toggle “git worktree” to isolate this session in a sibling checkout. Repeat for as many sessions as you need.
  • The kanban shows all sessions across phases (planning, in-progress, needs review, done) with the current file each agent is touching.
  • When a session completes, its diffs land in the visual diff viewer. Approve or reject inline, file by file.
  • Plans live as markdown documents in the same workspace. Codex reads from them and writes status back. The diff review covers the plan updates too.
  • An iOS companion lets you check status, accept diffs, and answer agent prompts when you are away from the laptop.

Tradeoffs:

Good: all sessions visible at once, no terminal switching.Good: mixed engines. Run a Codex session and a Claude Code session in the same project, on the same kanban.Good: diff review is visual, not raw text. Markdown changes are shown in the rendered document, mockups as visual diffs, code as inline file diffs.Good: Linux support, where the official Codex app does not run.Trade-off: another app to install. If you are happy with the official Codex app on macOS and never want to leave it, you do not need this.

Choosing between the four #

Use case Best option
One-off, just want to try parallel Worktrees + terminals
Heavy terminal user, want one window tmux or Claude Squad
Codex only, on macOS or Windows, single-engine work Official Codex desktop app
Codex + Claude Code, parallel sessions, visual review Visual workspace (Nimbalyst)
Linux developer who wants Codex in a desktop app Visual workspace (Nimbalyst)
Want to plan and execute in the same place Visual workspace (Nimbalyst)

Tips that apply to every approach #

A few patterns hold across all four options.

Always use worktrees, not branches in one checkout

If two Codex sessions edit files in the same checkout, you will lose work. Worktrees give each agent its own physical directory, so concurrent file edits cannot collide. Every option above either supports worktrees natively or works trivially on top of them.

Write a strong AGENTS.md

The single biggest quality jump for parallel sessions comes from a thorough AGENTS.md

at the repo root. Each new session reads it on startup. The better it is, the less drift across sessions. Include:

  • Project conventions (style, file layout, frameworks)
  • Out-of-scope files and folders
  • Commands the agent should and should not run
  • Test and build commands

Cap the number of concurrent sessions

Six is a soft ceiling for most developers. Past that, you spend more time reviewing than producing. Watch your “needs review” queue. If it is growing faster than you can drain it, run fewer sessions in parallel.

Set sandbox and approval policies

Parallel sessions multiply the chances that some agent runs a command you would not approve. Configure Codex’s approval policy per project so destructive operations require explicit review even when you are not looking. The visual workspaces surface approval prompts in one place; the terminal options spread them across windows.

Review diffs visually if you can

Reading parallel terminal output for four agents at once does not scale. Even if you stay on the CLI for execution, find a way to view diffs in a real diff viewer (a workspace, an IDE, or git difftool

on each branch). Reviewing in raw terminal text is where bugs sneak in.

Where to go next #

How to Use OpenAI Codex with a Visual Workspace

Step-by-step guide to using OpenAI Codex with a visual workspace: install the CLI, set AGENTS.md, run sessions in Nimbalyst, review diffs, and plan in markdown.

Best Codex GUI 2026: 4 Codex Desktop Apps Compared

The best Codex GUI in 2026. OpenAI Codex App, CodexMonitor, CloudCLI, and Nimbalyst compared on parallel sessions, worktrees, and platforms.

Best Tools for Parallel AI Coding Agents (2026)

Compare the best tools for running multiple Claude Code and Codex sessions in parallel — ccmanager, dmux, Superset, agentree, and Nimbalyst.

── more in #ai-agents 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-run-multiple-…] indexed:0 read:7min 2026-05-14 ·