Pochi LogoPochi Docs

Parallel Agents

Most coding assistants can handle one task at a time. But real projects often need multiple agents exploring, refactoring, and developing different features in parallel - across different branches or experiments. That's why we built Parallel Agents.

Parallel Agents let you run multiple Pochi agents concurrently, each inside its own Git worktree - isolated but synchronized with the same repository. Each agent can explore the code base, develop different PRs, or test different ideas in parallel without interfering with each other, while you can check their works and manage them in Pochi extensions.

Pochi Parallel Agents has the following features:

  • Worktree Integration: Leverage the Git worktree feature to gain an isolated env, did not recreate the wheel again.
  • Multi-to-Multi Execution: Tasks from Pochi could run in different worktree or the same one.
  • Task Management: All tasks can be managed on the Pochi sidebar.
  • Integrated UX: Review agents' works and open the terminal from one click.
  • VSCode Native: Create new Agents directly from the Repository manage view from VSCode.

Demo and Real World Use Cases

Let's go through the features of Parallel Agents by showing the real world workflow while we are developing Pochi. For the following demo, we will work on those two issues:

  1. https://github.com/TabbyML/pochi/issues/619
  2. https://github.com/TabbyML/pochi/issues/654

Meanwhile, we'll explore together how worktree feature is implemented.

We could operate on the default worktree directly; however, since those two issues are independent, we prefer to create a separate worktree for each.

Creating Worktree

There are two ways to create a new Worktree,

  1. Create from Pochi sidebar directly
  1. Create from VSCode Repository management You can first create a new worktree in VSCode Source Control Panel. Then manually link this worktree to a branch, and open this worktree in Pochi.

Create Worktree

Open Worktree in Pochi

In both cases, Pochi will create and check out the branch at the specified disk path as a worktree. You can then perform any action as if it were a standard Git repository, as an independent dev environment in each worktree.

Create Task in Pochi

Now we are ready to initiate tasks in each worktree to let them run in parallel. You'd see that once a task is initiated, Pochi opens a new tab for each task, and you can switch between different tabs to monitor the progress of each task.

Parallel Tasks

Interaction with Tasks

When you click on the task, Pochi will open the specific task, allowing you to interact with it.

Interact with Tasks

For instance, the task fix-issue-654 is now complete. We can review the modifications by selecting Diff worktree with origin/main, and Pochi will open a tab showing all the files changes.

Or choose Open in Integrated Terminal to launch the terminal within this worktree for command execution.