← All posts

workflow

Run five coding agents in parallel without them stepping on each other

The first time you run two coding agents against the same repository, you learn the hard way why almost nobody does it. Agent one refactors a module while agent two is mid-way through writing tests against the old API. Both finish "successfully." The working tree is a crime scene.

The fix isn't a smarter agent. It's an older, less glamorous piece of git that most engineers have never needed: worktrees.

Worktrees are the missing primitive

git worktree add gives you a second (third, fifth…) checkout of the same repository in a different directory, each on its own branch, all sharing one object store. No cloning, no duplicated history, near-zero disk cost — and, crucially, filesystem-level isolation between checkouts.

That maps one-to-one onto what a coding agent actually needs:

This is why worktree isolation has quietly become table stakes across the whole agent-manager space in 2026 — Cursor's Agents window does it, Anthropic's and OpenAI's first-party apps do it, and so does every serious open-source manager. The interesting differences are in what happens around the worktree.

What hang4r does with it

In hang4r, isolation is a per-session choice: hit New Agent, toggle worktree isolation, and the session gets its own checkout under the repo's worktree root with a generated branch. From there, three things compound:

  1. Per-turn checkpoints. Every completed turn becomes a checkpoint commit on the session branch. Not "the agent decided to commit" — every turn, mechanically. A bad turn is a rewind, not an archaeology dig.
  2. Review against the branch. The diff panel always shows the session branch against its base, so "what did this agent actually do" has a precise answer, no matter how many other agents are running.
  3. Best-of-N. Because sessions are cheap and isolated, you can dispatch the same task to Claude, Codex, and Cursor simultaneously with /best-of-n, then diff the three branches and merge the winner. The losers cost you nothing but tokens.

The practical ceiling isn't the machine

Five agents in parallel is not a compute problem — subprocesses are cheap and worktrees are cheaper. The ceiling is your attention. Parallelism only pays if you can answer "who needs me right now?" in one glance. That's the part most setups get wrong: five terminal tabs give you five places to forget about.

hang4r's answer is the tiled workspace: every session is a tile with a live status LED, a queued-messages lane so you can type while the agent works, and action-required badges that escalate to the dock when an agent is blocked on a permission. The sidebar groups sessions by project with account-limit gauges underneath — so you also know when to stop dispatching.

Try it on your own repo

Even without hang4r, adopt the pattern: one agent, one worktree, one branch, commit every turn. Your merge conflicts drop to near zero and your review workflow starts looking like a PR queue instead of a diff swamp. And if you'd rather have all of that wired up in one window — that's the product.

Run your agents in parallel, safely.

hang4r is in early access on macOS — bring your Claude Code, Codex, or Cursor subscription.

Request early access