<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-i-manage-multiple-coding-agents-with-git-worktrees-fursyd4ck" -->

---
title: How I manage multiple coding agents with Git worktrees
description: An open-source tool called Pragma is built around Git worktrees to manage multiple AI coding agents running in parallel. Each task gets its own worktree and...
canonical: https://daily.dev/posts/how-i-manage-multiple-coding-agents-with-git-worktrees-fursyd4ck
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How I manage multiple coding agents with Git worktrees | daily.dev
og:description: An open-source tool called Pragma is built around Git worktrees to manage multiple AI coding agents running in parallel. Each task gets its own worktree and...
og:url: https://daily.dev/posts/how-i-manage-multiple-coding-agents-with-git-worktrees-fursyd4ck
og:image: https://api.daily.dev/og/posts/Fursyd4Ck.png
og:image:alt: How I manage multiple coding agents with Git worktrees
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How I manage multiple coding agents with Git worktrees

**[Build With GenAI](https://daily.dev/sources/buildwithgenai)** · [@ektechworld](https://daily.dev/ektechworld) · 4 min read · 25 upvotes · 1 comments

## Summary

An open-source tool called Pragma is built around Git worktrees to manage multiple AI coding agents running in parallel. Each task gets its own worktree and branch so agents don't interfere with each other, with a sidebar tracking agent status (running, finished, waiting). It supports many agent CLIs (Claude Code, Codex, Cursor, OpenCode, Grok, Copilot, and others via plugins), a Kanban-style prompt board, and a 'Fanout' feature that sends the same prompt to multiple agents/models to compare implementations. It also bundles Git/GitHub integration for reviewing diffs, PRs, and sending review comments back to agents, plus a CLI, TypeScript SDK, plugin API, and a mobile companion app for monitoring long-running sessions. The project is open source and runs on macOS, Windows, Linux, iOS, and Android.

## Content

I’ve been using coding agents more and more, and once I started running several tasks in parallel I ran into a different problem.

The bottleneck wasn’t really generating code anymore. It was keeping track of everything around the agents.

Which agent is working on which task? Which branch does it belong to? Is it still running, finished, or waiting for me? What changed? Has the work been reviewed yet?

Git worktrees turned out to be a pretty good foundation for solving this.

Instead of having multiple agents modify the same checkout, I give each task its own worktree and branch. An agent can work independently without interfering with another task, and I can switch between them without constantly stashing changes or changing branches.

Over the last few months I ended up building an open-source application around this workflow called **Pragma**.

### Core Model

In Pragma, a project can contain multiple feature worktrees. Each worktree can have its own coding agent session, and the sidebar shows whether an agent is running, finished, or waiting for attention.

The agents still use their normal CLIs rather than being hidden behind a custom chat interface.

Pragma currently supports Claude Code, Codex, Cursor, OpenCode, Grok, Pi, Copilot, Junie, Kimi Code, Prime Agent, and custom agents through plugins.

There’s also a prompt board if you prefer a Kanban-style workflow. A task can move from an idea to an agent session, then through review and eventually a pull request.

### Running the same task through multiple agents

One thing I’ve found especially useful is being able to compare agents instead of choosing one beforehand.

Pragma has a feature called Fanout that sends the same prompt to multiple agents or models, each inside its own isolated worktree.

They can independently implement the task, and then you can compare the resulting changes.

Agents can trigger fanouts themselves through the CLI too. That makes it possible for one agent to delegate a problem to several other agents, inspect the different approaches, and choose which implementation it wants to continue with.

Different models often make surprisingly different architectural choices and ui decisions even when given the same repository and prompt.

### The Git side became just as important as running the agents

Once multiple agents are producing changes simultaneously, starting them is only half of the workflow.

You still need to inspect diffs, commit changes, push branches, open pull requests, deal with review feedback, and merge the changes.

So Pragma also has Git and GitHub integration built in. You can review diffs and PR comments from the same worktree where the agent ran.

Review comments can also be selected and sent back to an agent as a task to fix.

The goal is to make the workflow closer to:

**task → isolated worktree → agent → review → PR → merge**

rather than constantly jumping between terminals, Git clients, editors, and GitHub.

### Letting agents interact with the workspace

Another part I wanted to experiment with was making the workspace itself programmable.

Pragma has a CLI, TypeScript SDK, plugin API, and an agent skill that teaches coding agents how to interact with it.

That means an agent can do things like create worktrees, trigger fanouts, write richer scratchpads, or interact with other parts of the application instead of only modifying files in the repository.

Plugins can also add support for completely custom coding agents. You can add your own coding agent in one shot using the agent skill.

This is probably the main reason I built Pragma instead of keeping it as a small worktree manager. I don’t want the application to dictate which coding agent you have to use.

### Long-running agents create another problem

If an agent takes 30 minutes to complete something, I don’t really want to sit at my computer waiting in case it asks for permission or needs clarification.

So I also built a mobile companion.

The desktop app keeps the sessions running, while the mobile app lets you see agent status and respond when something needs attention.

Custom agent integrations built through Pragma’s plugin system work there as well.

### Where I’m going with it

There are already several good applications built around running coding agents in worktrees.

The part I’m most interested in with Pragma is treating the environment around the agents as something programmable and extensible rather than tying everything to one model or agent.

The project is completely open source and currently works on macOS, Windows, Linux, iOS, and Android.

Website:

https://pragma-app.sh/

Source:

https://github.com/pragma-sh/pragma

I’d be interested to hear how other people running multiple coding agents are handling this.

Are you using worktrees, containers, or another app from for this? And once you have several agents running, how are you keeping track of what needs your attention?

## Similar posts on daily.dev

- [Agent Manager: Run Multiple Agents Without the Chaos](https://daily.dev/posts/agent-manager-run-multiple-agents-without-the-chaos-gwfb9zory) · Kilo Blog · 0 upvotes · 0 comments
- [How to Run Claude Code Agents in Parallel](https://daily.dev/posts/how-to-run-claude-code-agents-in-parallel-48pijeifu) · Towards Data Science · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#claude-code](https://daily.dev/tags/claude-code), [#git](https://daily.dev/tags/git), [#github](https://daily.dev/tags/github)

[View this post on daily.dev](https://daily.dev/posts/how-i-manage-multiple-coding-agents-with-git-worktrees-fursyd4ck)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/how-i-manage-multiple-coding-agents-with-git-worktrees-fursyd4ck","headline":"How I manage multiple coding agents with Git worktrees","text":"An open-source tool called Pragma is built around Git worktrees to manage multiple AI coding agents running in parallel. Each task gets its own worktree and branch so agents don't interfere with each other, with a sidebar tracking agent status (running, finished, waiting). It supports many agent CLIs (Claude Code, Codex, Cursor, OpenCode, Grok, Copilot, and others via plugins), a Kanban-style prompt board, and a 'Fanout' feature that sends the same prompt to multiple agents/models to compare implementations. It also bundles Git/GitHub integration for reviewing diffs, PRs, and sending review comments back to agents, plus a CLI, TypeScript SDK, plugin API, and a mobile companion app for monitoring long-running sessions. The project is open source and runs on macOS, Windows, Linux, iOS, and Android.","url":"https://daily.dev/posts/how-i-manage-multiple-coding-agents-with-git-worktrees-fursyd4ck","datePublished":"2026-09-27T00:05:08.365Z","dateModified":"2026-10-15T02:22:32.007Z","author":{"@type":"Person","name":"Ethan","url":"https://daily.dev/ektechworld","image":"https://lh3.googleusercontent.com/a/ACg8ocJ2UHB0Akf7hp_hLqqmdg-0jXP60PwHJeNOKY5BRjYAD1JjWLU=s96-c","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":30}},"image":"https://media.daily.dev/image/upload/s--68q_hRzi--/f_auto/v1790467508/posts/Fursyd4Ck?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":25},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/buildwithgenai","name":"Build With GenAI"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Build With GenAI","item":"https://daily.dev/squads/buildwithgenai"},{"@type":"ListItem","position":3,"name":"How I manage multiple coding agents with Git worktrees"}]}
```

