Building a Desktop App to Orchestrate 5 Claude Agents in Parallel

Fazm Team··3 min read

Building a Desktop App to Orchestrate 5 Claude Agents in Parallel

Running multiple Claude Code agents from the terminal works, but a native desktop app takes the experience to another level. A Swift app that manages five agents in parallel gives you visual progress tracking, one-click task assignment, and automatic conflict detection - all in a native macOS interface.

Why a Desktop App

Terminal-based orchestration with tmux is functional but hard to monitor at a glance. A desktop app shows you:

  • Live status of each agent - working, waiting, completed, or stuck
  • Token usage per agent and total spend
  • File conflicts when two agents touch the same files
  • Output previews so you can review changes without switching contexts

The native SwiftUI interface updates in real time as agents report progress. You can see all five agents at once instead of cycling through tmux panes.

Architecture

The app spawns Claude Code processes through the command line, each in its own git worktree. A coordination layer tracks which files each agent is modifying and flags potential conflicts before they become merge problems.

Each agent gets:

  1. A dedicated worktree cloned from the same base branch
  2. A scoped task defined in natural language
  3. A CLAUDE.md context file with project-specific instructions
  4. An output channel that the app monitors for progress and completion

The Coordination Problem

The hardest part is not running five agents - it is making sure they do not step on each other. The app maintains a file-level lock map. When Agent 1 starts modifying auth.ts, Agent 3 gets a constraint added to its context: "Do not modify auth.ts - another agent is working on it."

This is not perfect. Semantic conflicts - where two agents make changes that individually work but break together - still require human review at merge time. But file-level coordination catches the obvious problems.

Results in Practice

Five agents working in parallel on genuinely independent tasks can compress a full day of work into about an hour. The key constraint is finding five tasks that are truly independent. Forced parallelism on coupled tasks creates more merge pain than it saves in time.

Fazm is an open source macOS AI agent. Open source on GitHub.

More on This Topic

Related Posts