DEV Community

Pedro
Pedro

Posted on

I Got Tired of Switching Between AI Coding Sessions, So I Built Open Orchestrator

If you've ever used Claude Code, Droid, or OpenCode on a real project, you know the pain: you're deep into a feature branch, your AI agent has full context, and then you need to fix a bug on another branch. Or test an API change. Or review a PR.

So you stop everything. Stash your work. Switch branches. Lose all your AI context. Start over.

I did this dozens of times a week before I snapped and decided to fix it.

The Problem

I run strategy at a software dev shop, but I'm in the code every day. We build systems for manufacturing and aerospace clients, and juggling multiple workstreams is just the reality. One afternoon I had three things going at once: a frontend auth flow, an backend refactor, and a hotfix for production. Each needed its own branch, its own context, its own AI session.

I kept bouncing between terminal tabs, re-explaining context to Claude Code every time I switched. It felt absurd. I was spending more time managing my AI sessions than actually building.

That's when it clicked: git worktrees already solve the branch-switching problem for code. What if I could solve it for AI sessions too?

What I Built

Open Orchestrator is a Python CLI (owt) that combines git worktrees, tmux, and AI coding tools into a single orchestration layer. The core idea is simple:

One command creates an isolated workspace with its own branch, its own tmux session, and its own AI agent — all running in parallel.

# Create three parallel workstreams in seconds
owt create feature/auth-flow
owt create fix/api-bug
owt create feature/dashboard-redesign
Enter fullscreen mode Exit fullscreen mode

Each of those commands:

  1. Creates a git worktree (isolated copy of your repo on its own branch)
  2. Spins up a tmux session with customizable pane layouts
  3. Auto-detects your project type and installs dependencies
  4. Copies over .env files and configuration
  5. Launches your AI tool of choice (Claude Code, OpenCode, or Droid)

And here's the part that changed everything for me: you can send commands to any of those sessions without leaving your current terminal.

# You're working on auth. Fire off a task to the API worktree.
owt send api-bug "Review the rate limiting logic and suggest improvements"

# Keep working. Check on everyone later.
owt status
Enter fullscreen mode Exit fullscreen mode

The Architecture Decisions That Mattered

Building this taught me a few things worth sharing.

Git worktrees over containers. My first instinct was Docker. But worktrees are lightweight, share the same .git directory, and don't need any daemon running. They're the perfect abstraction for parallel branches — you get full isolation with almost zero overhead.

tmux as the session layer. I considered building a custom process manager, but tmux already handles everything: pane layouts, session persistence, send-keys for remote command injection. Why reinvent it? I added a --no-tmux mode later for people who prefer simpler setups, but tmux remains the power-user path.

Project detection that actually works. Open Orchestrator scans for pyproject.toml, package.json, Cargo.toml, go.mod, and composer.json — then picks the right package manager. Python project with uv.lock? It uses uv. Node project with bun.lockb? It uses bun. No config needed.

Status tracking with hooks. Every worktree has a status (idle, working, blocked, completed, error) that gets tracked in a local JSON store. You can wire up hooks to get desktop notifications, Slack webhooks, or custom scripts triggered on status changes. The live TUI dashboard pulls all of this together.

Then Claude Code's Creator Posted the Same Workflow

While I was building this, Boris Cherny — the creator of Claude Code — dropped a thread with tips from the Claude Code team. I almost fell out of my chair.

Tip #1: the biggest productivity unlock is running multiple Claude sessions in parallel using git worktrees. He described setting up isolated checkouts so each session works without conflicts — one tab per task. His earlier thread revealed he personally runs 5 Claudes in parallel in his terminal, numbered 1-5, plus 5-10 more on claude.ai.

That was the exact architecture I'd been building toward. But more than that, several of his other tips mapped directly to features I'd already shipped:

"Invest in your CLAUDE.md"owt create automatically copies your CLAUDE.md into each new worktree with path adjustments. Your accumulated AI context travels with every workspace.

"Create your own skills and commit them to git" — Open Orchestrator ships as a Claude Code skill. Run owt skill install and Claude itself can manage worktrees through slash commands:

/worktree create feature/something-cool
Enter fullscreen mode Exit fullscreen mode

"One tab per task/worktree" — This is the exact mental model. Each owt create gives you a dedicated tmux session for that task, with system notifications when an agent needs input.

Seeing the creator of Claude Code recommend the same patterns I'd independently arrived at was the validation I didn't know I needed. It told me this wasn't just my workflow — it's how parallel AI development should work.

The Workflow That Sold Me

Here's my actual day-to-day now:

# Morning: set up the day's work
owt create feature/user-permissions
owt create fix/memory-leak --plan-mode
owt create feature/reporting-api --ai-tool opencode

# Fire off tasks
owt send user-permissions "Implement role-based access control for the admin panel"
owt send memory-leak "Investigate the memory leak in the WebSocket handler, plan only"
owt send reporting-api "Build the quarterly revenue endpoint with proper pagination"

# Monitor everything from one terminal
owt dashboard
Enter fullscreen mode Exit fullscreen mode

The dashboard gives me a real-time view of all three agents: what they're working on, token usage, estimated costs, and how long since their last activity.

When an agent finishes, I switch into its session to review:

owt switch user-permissions --tmux
Enter fullscreen mode Exit fullscreen mode

No context loss. No re-explaining. The full conversation history is right there.

GitHub PR Integration

One feature I didn't plan but couldn't live without: PR linking.

owt pr link user-permissions --pr 47
owt pr status
owt pr cleanup  # auto-delete worktrees for merged PRs
Enter fullscreen mode Exit fullscreen mode

When a PR gets merged, owt pr cleanup handles the teardown. No more orphaned worktrees accumulating on disk.

What's Under the Hood

The stack is intentionally minimal:

  • Python 3.10+ with Click for the CLI
  • Rich for the TUI dashboard and formatted output
  • Git and tmux as the core infrastructure
  • No database — just JSON files in ~/.open-orchestrator/
  • MIT licensed, fully open source

The codebase follows clean architecture principles with separate layers for core logic, models, and CLI. Everything is typed and tested with pytest.

Try It

git clone https://github.com/gitpcl/openorchestrator.git
cd openorchestrator
uv pip install -e .

# Create your first parallel worktree
owt create feature/try-it-out
Enter fullscreen mode Exit fullscreen mode

You'll need Python 3.10+, git, and tmux. If you use Claude Code, it works out of the box — just make sure the CLI is installed.

The repo also ships with Claude Code slash commands and a context-injection hook, so Claude itself can manage worktrees for you:

/worktree create feature/something-cool
Enter fullscreen mode Exit fullscreen mode

What's Next

I'm actively working on a few things:

  • Session sharing — copy AI context between worktrees so agents can build on each other's work
  • Cost budgets — set per-worktree token limits and auto-pause when exceeded
  • Team mode — shared dashboard for teams running parallel AI workstreams

I built Open Orchestrator to scratch my own itch. The fact that Claude Code's creator independently arrived at the same patterns just tells me the problem is real and the solution is right.

If you're juggling multiple branches and AI coding tools, give Open Orchestrator a try. Stars, issues, and PRs are all welcome.


Open Orchestrator is open source under the MIT license. Built because managing AI sessions shouldn't be harder than the actual coding.

GitHub logo gitpcl / openorchestrator

Open source git worktree + tmux orchestration for parallel AI-assisted development.

Open Orchestrator

A Git Worktree + AI coding tool orchestration tool combining a Python CLI with plugin integration for managing parallel development workflows. Supports Claude Code, OpenCode, and Droid.

Overview

Open Orchestrator enables developers to work on multiple tasks simultaneously by creating isolated worktrees, each with its own Claude Code session and tmux pane. Perfect for parallel development workflows where you need to context-switch between features without losing your place.

Features

  • Git Worktree Management: Create, list, switch, and delete worktrees with automatic branch management
  • tmux Integration: Auto-create tmux sessions with customizable layouts for each worktree
  • Multi-AI Tool Support: Auto-launch Claude Code, OpenCode, or Droid in new sessions
  • Project Detection: Automatically detect project type (Python, Node.js, Rust, Go, PHP) and package manager
  • Dependency Installation: Auto-install dependencies when creating new worktrees
  • Environment Setup: Copy .env files and CLAUDE.md with path adjustments
  • Cleanup Service: Detect and…




Top comments (0)