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.

Chat-based AI tools
Mrrlin
Token cost
Full context re-sent with every prompt
Progressive context compression — the fewest tokens per task
Project memory
Forgets between sessions — you re-explain and re-instruct
Memory is captured continuously — context stays attached to the work

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.

Without a harness: context, prompts, checking, and follow-ups stay on you.With Mrrlin: one visible operating loop around the agents you already use.
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.

01You created five worktrees by hand last week. Two now have no obvious owner, one sits on a branch nobody remembers naming, and deleting the wrong one would throw away an agent's afternoon of work.
02Nothing inside a worktree records which task it serves, which base commit it started from, or what would count as finished, so every review begins with a round of archaeology.
03AI agents in separate git worktrees still collide at merge time when two of them rewrite the same module, each from a different base commit, and the conflict lands on whoever merges second.
04An agent tries an approach, it half works, and the branch lingers for weeks because nobody wrote down whether the experiment was abandoned or merely paused.

Workflow

Worktrees as the boundary, with a record wrapped around each one.

01

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.

02

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.

03

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.

04

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.

Usual approach
Mrrlin
What a worktree is for
A directory name and your memory of why you created it, which fades faster than the branch does.
Each run records its task, branch, base commit and worktree, so the purpose of every directory is looked up rather than recalled.
Abandoned attempts
Stale branches that nobody dares to delete, because nobody knows whether someone still needs them.
An abandoned attempt ends as closed with no result, and the reason for dropping it is written to project memory.
Overlapping changes
Discovered at merge time, when the second person to merge inherits the conflict and the context behind it.
Blocked-by links sequence tasks that touch the same code, and every diff is reviewed on its own before any pull request opens.

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