Welcome to Tech Athletes | テック・アスリート   Click to listen highlighted text! Welcome to Tech Athletes | テック・アスリート

Running Multiple AI Coding Agents in Parallel on macOS: A Solo Developer’s Playbook for Claude Code and Codex CLI

Running Multiple AI Coding Agents in Parallel on macOS: A Solo Developer’s Playbook for Claude Code and Codex CLI

If you build products alone, your scarcest resource isn’t compute or money. It’s attention. AI coding agents like Claude Code and OpenAI’s Codex CLI can now handle whole tasks on their own: refactoring a module, writing tests, drafting documentation. The obvious next question is: why run only one at a time?

This guide covers how I run several AI agents at once on a single Mac. It includes the setup, the rules that keep parallel agents from breaking each other’s work, and where this approach stops paying off.

Why Parallel Agents Change the Solo-Developer Equation

A single agent working on a medium-sized task often needs 5–20 minutes of mostly unattended time. If you sit and watch it, you’ve traded your own coding time for babysitting time. Running agents in parallel turns that waiting time into throughput:

  • Agent A implements a new API endpoint.
  • Agent B writes tests for last week’s feature.
  • Agent C (a different model) reviews Agent A’s diff with fresh eyes.

Your job shifts from writing code to dispatching, reviewing, and merging. You’re working more like an engineering manager with a very fast, very literal team.

The macOS Setup: Hardware and Terminal Layout

Hardware That Actually Matters

The agents run their heavy inference in the cloud, so your Mac isn’t doing the “thinking.” What it is doing is running builds, test suites, dev servers, and language servers for each agent’s workspace, at the same time. Four agents each running npm test at once will expose weak hardware quickly.

Component Practical Recommendation Why
RAM 32GB or more Several dev servers + test runners + browsers at once
CPU Apple Silicon (M-series) Parallel builds finish without thermal throttling
Display Large external monitor See 4–6 terminal panes without constant switching
Storage Fast SSD, room for several repo copies Each agent gets its own working copy (see below)

A desktop Mac works well as an always-on agent host. Mac mini (M4) on Amazon Japan →

Screen space is the other hard limit. Reviewing parallel output on a 13-inch laptop screen is painful. 27-inch 4K USB-C monitor on Amazon Japan →

Terminal Layout

Each agent gets a dedicated terminal pane. A common layout is a 2×2 or 2×3 grid, where each pane is labeled by task. Tools like tmux, iTerm2 split panes, or a dedicated agent dashboard all work. The key rule: one pane = one agent = one task. Once you let two tasks share a pane, you lose track of which output belongs to what.

The Golden Rule: Isolate Every Agent’s Working Directory

The biggest mistake in parallel agent work is pointing two agents at the same checkout. They overwrite each other’s files, one agent’s failing build confuses the other, and a stray git checkout can wipe out in-progress work.

The fix is git worktrees. Each agent gets its own directory and branch, all backed by the same repository:

git worktree add ../myapp-feature-auth -b feature/auth
git worktree add ../myapp-tests-billing -b test/billing
git worktree add ../myapp-docs -b docs/api-reference

Then start one agent inside each directory. When a task finishes, you review the branch, merge it, and remove the worktree. Conflicts show up where they belong: at merge time, under your control, not halfway through an agent’s run.

Mixing Claude Code and Codex CLI: Draft vs. Critique

Running two different agents is more useful than running two copies of the same one. Different models have different blind spots, so I split the roles:

  • Claude Code as the primary implementer. It handles multi-file changes, runs tests, and iterates until they pass.
  • Codex CLI as an independent reviewer, run non-interactively so it doesn’t take over a terminal.

For review, Codex’s non-interactive mode fits well because you can script it and restrict it to read-only access:

codex exec --ephemeral --sandbox read-only 
  "Review the diff on branch feature/auth. List bugs, missing edge cases, and weak logic."

A read-only sandbox means the reviewer can look at the code but can’t change it. That keeps the “who wrote what” line clear. I don’t apply the reviewer’s comments automatically. I check each one against the code first, because a second model is also wrong sometimes.

A Typical Morning Dispatch

Pane Agent Task Permissions
1 Claude Code Implement feature in worktree A Write, limited to worktree
2 Claude Code Add tests in worktree B Write, limited to worktree
3 Codex CLI Review yesterday’s merged diff Read-only
4 Shell Human: merging, manual checks Full

Operational Rules That Keep Parallel Agents Sane

  • Write tight task briefs. Each brief should say what “done” means, for example “all tests in tests/billing pass.” Vague goals lead to agents wandering off-task.
  • Cap concurrency at your review capacity. Most people can review 3–4 streams properly. Six agents creating diffs you never read is technical debt, not productivity.
  • Keep secrets out of reach. Don’t put production credentials in agent working directories. Use scoped tokens.
  • Be careful with shared resources. Two agents starting dev servers on port 3000, or both migrating the same local database, will collide. Assign ports and databases per worktree.
  • Commit often, merge deliberately. Agent branches are cheap to throw away. Your main branch isn’t.
  • Watch your usage limits. Parallel agents burn through subscription or API quotas several times faster than one agent does.

Where Parallelism Stops Paying Off

Parallel agents work best on independent tasks. They struggle when tasks are tightly coupled, such as a schema change that the API layer and the frontend both depend on. In that case, run the tasks one after another: finish and merge the foundation first, then fan out. If you parallelize dependent work, you’ll spend the saved time resolving merge conflicts.

The other limit is you. Every agent’s output needs a human decision in the end. Your review bandwidth is the real ceiling, so it’s worth investing in your own workflow and ergonomics. A keyboard you can type on all day helps too. Mac-compatible mechanical keyboards on Amazon Japan →

For the management side of working this way (delegating, clear specs, reviewing output), classic software engineering books still hold up. The Pragmatic Programmer on Amazon Japan →

Key Takeaways

  • Give each agent its own git worktree. Never share a checkout.
  • Use different models for drafting and critique: Claude Code builds, Codex CLI reviews in read-only mode.
  • Set the number of agents by how much you can review, not by what your machine can run.
  • Parallelize independent tasks. Run dependent ones in order.

Once you’re past three or four agents, keeping track of terminals becomes its own chore. I use Agent Desk to manage each agent as a tile on one screen.

📝 More in-depth guides available on note.com: Follow @ksta877 on note.com for deep-dive OSS reviews, tutorials, and premium technical articles.

This post contains affiliate links. As an Amazon Associate I earn from qualifying purchases.

✨ Claudeエージェントを複数走らせるならAgent Desk
Terminal tile manager for macOS。全ソース付き $10 買切り。
Agent Desk を見る →

投稿者 kasata

IT企業でエンジニアとして勤務後、テクノロジー情報メディア「Tech Athletes(テック・アスリート)」を運営。プログラミング、クラウドインフラ(AWS/GCP/Azure)、AI活用、Webサービス開発を専門とする。エンジニア・ビジネスパーソン向けに、実際に使ってみた経験をもとに信頼できる技術情報を発信中。資格:AWS認定ソリューションアーキテクト、Python 3 エンジニア認定試験合格。

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Click to listen highlighted text!