AI Agents and Git Worktrees for Safer Parallel Coding
Coordinate AI agents across git worktrees with Mrrlin task context, branch evidence, review checkpoints, and merge-ready outputs.
Chat tools vs Mrrlin
The execution layer beats another blank chat window.
Chat tools make you re-send context and manage the work. Mrrlin keeps project memory and spends tokens deliberately.
Your agents, under one harness
One coding agent gives you output. Mrrlin gives you a harness.
Codex, Claude Code, and other agents can write. Mrrlin keeps the brief, routes each task, challenges weak work, and brings you in only for decisions that need you.
Read the workflow transcript
Without a harness, a person carries context between prompts, checks each output, follows up, and decides what happens next. With Mrrlin, one goal becomes a visible plan: work is routed, reviewed, retried when weak, and brought back only for the decisions that need a human.
Why it matters
A worktree isolates files. It does not say what the files are for.
Mrrlin helps each worktree stay tied to the right task, base branch, verification steps, and handoff notes.
Workflow
Worktrees as the boundary, with a record wrapped around each one.
A worktree for every run
Each execution run gets its own isolated git worktree, and your own checkout is left alone. You keep working on your branch while agents change theirs, and none of their edits appear in your working tree until a pull request brings them there.
Record branch and base
Next to the task it serves, the run keeps its branch name, the commit it started from, the worktree path and which provider did the work. With that starting commit on file, a reviewer sees exactly what the agent built on, and a stale base is visible before merge.
Collect evidence in place
Terminal output, test runs, checkpoints and the summary of each diff accumulate while the agent works inside its worktree. When the run ends, the evidence is already attached to the task instead of being scattered across a directory you would have to open to understand.
Leave through review
Before the branch becomes a pull request on your repository, a reviewer that did not write it reads the diff. The task then ends as done, or as closed with no result when an attempt is abandoned, so the outcome of every worktree is written down.
Use cases
Where it fits.
Isolated agent branches
An agent adds an audit log table and its migration on its own branch while you keep fixing a billing bug in yours. The run shows the branch name and base commit, so nobody has to guess which directory holds the migration or where it began.
Conflict reduction
Two tasks both touch the payments module. Instead of letting their worktrees diverge in parallel, the second task is marked blocked by the first, so its run starts only after the first change has landed, and the overlap is handled in planning rather than at merge time.
Parallel experiments
Try two caching strategies for the product catalog endpoint in two worktrees at once. Compare their diff summaries and test results, keep the faster one, and mark the other closed with no result, so the abandoned branch has a recorded outcome instead of an open question.
PR preparation
When review passes, the worktree's branch opens as a pull request on your repository through its grant. Attached are the change summary, the test output, the agent's self-review and the reviewer's verdict, so whoever merges reads intent and evidence, not just a branch name.
Comparison
Worktrees made by hand, and worktrees that belong to a task.
Keep reading
More on coordinating coding agents.
Start from the AI coding agent orchestration overview, or go deeper with the guides next to this one.
FAQ
Before you start.
Does Mrrlin ever run AI agents in my own checkout instead of a git worktree?
No. Each execution run is confined to an isolated git worktree and kept out of your checkout, so you can keep working on your own branch while agents work on theirs. The run record names the worktree, branch and base commit it used, which makes it clear afterwards where each change was made and what it was based on.
How do I keep track of which worktree belongs to which task?
You look it up instead of remembering it. Each run is tied to its task and records the worktree, branch and base commit it used, and the task's status shows whether that work finished, failed, is waiting on a handoff, or was closed with no result. The board answers the question that directory names cannot.
How does review work when several AI agents work in separate git worktrees?
Each run is reviewed on its own, by a model whose provider differs from the author's, using that worktree's diff summary and test results. Passing runs move to pull request status one at a time, so you merge a series of reviewed changes rather than one combined diff from several agents.
Orchestrate Claude Code & Codex CLI without terminal lockups.
Stop juggling disconnected CLI windows and resolving manual merge collisions. Mrrlin coordinates your agents in isolated git worktrees, collects passing test artifacts, and opens verified pull requests.
No credit card · No migration · One goal