Worktrees for Parallel Development
~430 Words | ~1.5min Read
Last month, I completed several sprint stories simultaneously for the first time. Not sequentially. Not by context-switching between them. Actually in parallel, with different AI agents working on each story at the same time. Leaving the snake-oil feel out of it, how could a single developer do the same scope as a team !?
The breakthrough wasn’t “use AI agents”. At least not by themselves. I’d been coordinating multiple agents for weeks, but always in the same workspace. The problem? Change Collision. When agents share a workspace, they’d fight between their changes. Agent A’s changes confuse Agent B. Agent B’s test runs interfere with Agent A’s build. The coordination overhead killed any productivity gains.
Then I remembered Git worktrees. If these bits of code were completely in different zones, so I didn’t have to worry about them conflicting… I needed separate working zones! So I set up separate worktrees for each. And opened independent IDE windows to drive them. Physical workspace isolation solved the collision problem entirely.
What surprised me wasn’t just that it worked. It was how my role shifted. I wasn’t writing code anymore. I was orchestrating. One agent would start its TDD cycle while I reviewed the other’s results. When both hit their validation/integration phases, I’d spot-check then guide the merge. I shifted from writing code to building validation systems. Stuff like unit tests, log file capture, and support scripts. And when I wasn’t doing that I was coordinating parallel work streams.
This brought to mind something I’ve been hearing about in industry circles: The Software Factory. Developers building automated validation rather than writing implementation. I won’t claim to have a whole factory setup. But a backbone of solid workflows, and some test harnesses made it possible. Mix in Trunk-based development with feature branches, and you’re cooking with gas! The evolution happened faster than I expected. It wasn’t flawless, for sure, but I got the knack for it within a couple days. Now it’s my default mode. But I had to trust the Agentic output!
You build Agent trust through quality gates, not hope. Hope is not a method. Automated tests, and validation create the safety net that enables autonomy. Orchestration beats micromanagement. Get your system to produce quality code reliably. Then worktrees let you scale from one developer to a small development team.
Can one developer build the same scope of work as a team? Yes, If that developer steps back. Act like a lead. Build repeatable AI systems. Then coordinate several agents working in isolated worktrees. Then it might actually work.