Adding a second AI agent to a project feels like doubling your output. In practice, it usually means doubling your bookkeeping too. Every agent needs its own worktree so it can work without touching the branch someone else, human or otherwise, is using. Multiply that by five agents across three repos, and the isolation that made parallel work possible starts generating its own kind of work: which worktree goes with which branch, which ones are stale, which upstream nobody remembers creating.
That part doesn’t make it into most agentic AI pitches. It’s also the part GitKraken Desktop 12.4 was built to remove.
Where the mess actually comes from
Git worktrees let you check out multiple branches at once, in separate folders, so one agent can work on a feature while another handles a bug fix without touching the same files. That’s the whole point of them, and it works. The friction shows up after the work is done, when you’re the one who has to remember which worktree belongs to which task.
“With more people using agents and other tools that generate worktrees, work tree management is becoming a big headache for developers,” says Trevor Polidore, Product Manager here at GitKraken. “Things can get pretty messy when you have a bunch of agents running and trying to work on multiple things.”
Why does deleting a branch checked out in a worktree fail by default?
Git blocks it on purpose. Deleting a branch that’s checked out somewhere else could orphan files an agent, or a person, is still relying on. It’s a safety rail, but from the command line it’s also a dead end: you hit the error, go find the worktree, remove it by hand, then come back and delete the branch. Multiply that by every agent session merged this week, and cleanup becomes its own part-time job.
What GitKraken Desktop 12.4 automates
When a pull request tied to an agent’s worktree merges, GitKraken Desktop 12.4 can tear down the worktree, its branch, and its upstream in one motion instead of three manual steps. Right-click a branch that’s checked out in a worktree, and GitKraken Desktop now offers to remove the worktree as part of the delete, so the Git safety rail stops being a chore.
“We’re aiming to abstract away the parts you don’t need to worry about, especially when managing agents,” Polidore says.
The bigger idea: issue to merge, one continuous act
Cleanup is the last mile of a workflow the desktop team has been rebuilding end to end. Polidore described the goal as getting from starting an agent on an issue to merging the final work into main, without manual handoffs in between: no copying issue context into a prompt, no typing terminal commands to spin up a worktree, and now, no separate cleanup step once the work ships.
We covered the middle of that flow, starting an agent straight from an issue and approving or denying what it does inline, in GitKraken Desktop 12.4: See Every Agent, Approve Every Change [LINK]. This is the part after the merge button.
Built from what developers actually run into, not guesses
None of this came from a whiteboard. Polidore’s team watches how customers actually run agentic workflows, because, in his words, “everyone has a different way of working” and the team is “not trying to make any guesses.” Feedback lands in an internal Slack channel, and from there, “all the developers are adding on, reacting to it. It really fuels us.”
That loop, feedback in, friction out, is why worktree cleanup made it into 12.4 at all. It was never going to be the headline feature. It was just the thing developers kept running into.
Try it
GitKraken Desktop 12.4 is available now. Download GitKraken Desktop free and let it clean up after your agents so you don’t have to.
FAQ
Does GitKraken Desktop clean up Git worktrees automatically? Yes. When a pull request tied to a worktree merges, GitKraken Desktop 12.4 can tear down the worktree, its branch, and its upstream together.
Why can’t I delete a Git branch that’s checked out in a worktree? Git blocks this by default to avoid orphaning files still in use. GitKraken Desktop 12.4 offers to remove the worktree as part of the branch delete, so you don’t have to do it in two steps.
How does GitKraken Desktop help manage multiple AI agents running in parallel? Each agent works in its own isolated worktree, and GitKraken Desktop tracks status and handles cleanup once the related work merges, so parallel agent sessions don’t turn into manual bookkeeping.
GitKraken MCP
GitKraken Insights