I saw with the 2026 update of Jetbrains PHPStorm they are in on the git worktree hype.
I understand that it is a version control feature that creates less friction when there are multiple agents running and changing code.
The thing I don't understand is why would you think it is a great idea to let multiple agents change the same code parts?
If you are in charge of a team isn't it the first thing to divide the tasks so that they are isolated?
When they are not isolated isn't that a recipe for merge conflicts?
AI development feels like knowing to walk for years, and suddenly forgetting to do it because you can drive a car now.
The time animals could talk
Before AI exploded there were, and still are, many people that favored thunk based development. The main goal is to have less branches and if there are branches they should be short lived.
While I do think it is a great concept, like any other concept the usage depends on the conditions.
I have been in situations where clients asked for features and forget about them for weeks or months. I'm not comfortable dragging a feature along for months while keeping on with maintenance of the application.
When they decide to make feature a priority again, the first thing is to asset how much more work it is to get the feature code into the current codebase. It is a cost as a consequence of their behavior.
So feature branches can still be a valid solution while thunk based development is the default way of working.
Enter AI agents
An example I got from Claude Haiku:
- Agent 1 writing documentation in one worktree
- Agent 2 writing tests in another worktree
- Agent 3 refactoring code in a third worktree
Agent 1 and 2 could be combined in my opinion.
Even if the documentation overlaps with the tests, why would it be a problem to use the same branch?
I'm the boss of the commits for now, but even if you let an agent commit the documentation files and the test files they don't overlap, right?
When you need to refactor code while maintaining the application, wouldn't you do that gradually?
And if a big bang refactor need to happen, wouldn't that take the priority over the other work?
Another question I have is who is checking the worktrees?
All fine that agents creates worktrees but in the end the worktrees need to be merged.
Isn't this the same scenario than the client forgetting about features for a period of time?
Now all together
Moving on I think we need to build on what we have learned working with human teams and use the parts that apply when AI agents are thrown into the mix.
If your situation needs git worktrees use them, just be sure that is the best option for your workflow.
Top comments (0)