RSSAmplifier

Engineering Heresy · Jun 1, 2026

Build Your AgenticOS: Worktrees for Parallel Agents

0
Sign in to vote or save

Glenn Eggleton · Engineering Heresy

Git worktrees are how you get the wall-clock benefits of parallelism without the merge conflicts. Use them whenever two agents may touch the same files.

You run four agents in parallel. All four try to edit the same source file. The last one to write wins. The other three changes are gone. You don't get an error. You don't get a merge conflict. You get silent data loss dressed up as a successful run.

That is not a parallelism problem. It is an isolation problem. Parallelism is the right call; sequential dispatch of independent work is a bug. The mistake is dispatching parallel agents into a shared working tree and expecting them not to stomp on each other.

Git worktrees fix this. Each agent gets its own branch, its own working directory, zero shared file state. When the agents are done, you read the diffs and merge. The wall-clock cost of parallelism, without the silent data loss.

Here is what worktrees are, the exact rule for when to use them, the cost you're accepting, the wave pattern that keeps dispatch manageable, the verification discipline that catches agent failures, and the anti-pattern that makes the whole thing pointless.

Read the original on geggleto.substack.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.