dmux-workflows
affaan-m/ecc
Orchestrate parallel AI agent workflows using dmux, a tmux pane manager for coordinated multi-agent development.
What is dmux-workflows?
dmux is a tmux-based orchestration tool that manages multiple AI agent sessions in parallel across Claude Code, Codex, OpenCode, and other harnesses. Use it when you need to split complex tasks into independent parallel tracks, coordinate work across multiple agents, or run divide-and-conquer development workflows.
- Create and manage multiple agent panes within a single tmux session
- Run independent agent tasks in parallel (research, implementation, testing, code review)
- Merge pane outputs back to the main session for integration
- Support multiple AI harnesses (Claude Code, Codex, OpenCode, Cline, Gemini, Qwen) in the same workflow
- Integrate with git worktrees to isolate file changes across parallel tasks
- Orchestrate complex workflows using the ECC helper script with task plans
How to install dmux-workflows
npx skills add null --skill dmux-workflows- tmux installed (brew install tmux on macOS, apt install tmux on Linux)
- dmux package installed from github.com/standardagents/dmux
- Node.js (for ECC orchestrate-worktrees helper script)
How to use dmux-workflows
- 1.Install dmux from github.com/standardagents/dmux and review the package
- 2.Start a dmux session by running `dmux`
- 3.Press 'n' to create a new pane and enter your agent prompt (e.g., 'Implement auth middleware')
- 4.Repeat for each parallel task, keeping tasks independent and file-isolated
- 5.Monitor pane progress; press 'm' to merge completed pane output back to main session
- 6.For complex workflows, use the ECC helper: `node scripts/orchestrate-worktrees.js plan.json --execute`
Use cases
- Split research and implementation into parallel tracks, then merge findings
- Parallelize multi-file features across independent components (schema, API, UI)
- Run tests in watch mode in one pane while fixing failures in another
- Conduct parallel code reviews from different perspectives (security, performance, coverage)
- Use different AI tools for different tasks in a single coordinated workflow
- Developers managing complex multi-part projects
- Teams coordinating work across multiple AI agents
- Engineers working on large features that can be decomposed into independent tasks
- Anyone needing divide-and-conquer parallelism in agent-driven development
dmux-workflows FAQ
Use dmux when tasks are independent and can run in parallel, such as implementing different features, researching while implementing, or running tests while fixing code. Avoid it for dependent tasks where one pane needs output from another.
Keep total panes under 5-6 to manage API token usage and system resources. Each pane is a full agent session consuming tokens.
Use git worktrees to isolate file changes per pane. Create separate worktrees for each task, run agents in each worktree, then merge branches when complete.
Yes. dmux supports Claude Code, Codex, OpenCode, Cline, Gemini, and Qwen. You can assign different harnesses to different panes for cross-tool workflows.
Review pane output before merging to avoid conflicts. Use git worktrees for file-conflict-prone work, and merge branches strategically after reviewing changes.
Full instructions (SKILL.md)
Source of truth, from affaan-m/ecc.
name: dmux-workflows description: Multi-agent orchestration using dmux (tmux pane manager for AI agents). Patterns for parallel agent workflows across Claude Code, Codex, OpenCode, and other harnesses. Use when running multiple agent sessions in parallel or coordinating multi-agent development workflows. metadata: origin: ECC
dmux Workflows
Orchestrate parallel AI agent sessions using dmux, a tmux pane manager for agent harnesses.
When to Activate
- Running multiple agent sessions in parallel
- Coordinating work across Claude Code, Codex, and other harnesses
- Complex tasks that benefit from divide-and-conquer parallelism
- User says "run in parallel", "split this work", "use dmux", or "multi-agent"
What is dmux
dmux is a tmux-based orchestration tool that manages AI agent panes:
- Press
nto create a new pane with a prompt - Press
mto merge pane output back to the main session - Supports: Claude Code, Codex, OpenCode, Cline, Gemini, Qwen
Install: Install dmux from its repository after reviewing the package. See github.com/standardagents/dmux
Quick Start
# Start dmux session
dmux
# Create agent panes (press 'n' in dmux, then type prompt)
# Pane 1: "Implement the auth middleware in src/auth/"
# Pane 2: "Write tests for the user service"
# Pane 3: "Update API documentation"
# Each pane runs its own agent session
# Press 'm' to merge results back
Workflow Patterns
Pattern 1: Research + Implement
Split research and implementation into parallel tracks:
Pane 1 (Research): "Research best practices for rate limiting in Node.js.
Check current libraries, compare approaches, and write findings to
/tmp/rate-limit-research.md"
Pane 2 (Implement): "Implement rate limiting middleware for our Express API.
Start with a basic token bucket, we'll refine after research completes."
# After Pane 1 completes, merge findings into Pane 2's context
Pattern 2: Multi-File Feature
Parallelize work across independent files:
Pane 1: "Create the database schema and migrations for the billing feature"
Pane 2: "Build the billing API endpoints in src/api/billing/"
Pane 3: "Create the billing dashboard UI components"
# Merge all, then do integration in main pane
Pattern 3: Test + Fix Loop
Run tests in one pane, fix in another:
Pane 1 (Watcher): "Run the test suite in watch mode. When tests fail,
summarize the failures."
Pane 2 (Fixer): "Fix failing tests based on the error output from pane 1"
Pattern 4: Cross-Harness
Use different AI tools for different tasks:
Pane 1 (Claude Code): "Review the security of the auth module"
Pane 2 (Codex): "Refactor the utility functions for performance"
Pane 3 (Claude Code): "Write E2E tests for the checkout flow"
Pattern 5: Code Review Pipeline
Parallel review perspectives:
Pane 1: "Review src/api/ for security vulnerabilities"
Pane 2: "Review src/api/ for performance issues"
Pane 3: "Review src/api/ for test coverage gaps"
# Merge all reviews into a single report
Best Practices
- Independent tasks only. Don't parallelize tasks that depend on each other's output.
- Clear boundaries. Each pane should work on distinct files or concerns.
- Merge strategically. Review pane output before merging to avoid conflicts.
- Use git worktrees. For file-conflict-prone work, use separate worktrees per pane.
- Resource awareness. Each pane uses API tokens — keep total panes under 5-6.
Git Worktree Integration
For tasks that touch overlapping files:
# Create worktrees for isolation
git worktree add -b feat/auth ../feature-auth HEAD
git worktree add -b feat/billing ../feature-billing HEAD
# Run agents in separate worktrees
# Pane 1: cd ../feature-auth && claude
# Pane 2: cd ../feature-billing && claude
# Merge branches when done
git merge feat/auth
git merge feat/billing
Complementary Tools
| Tool | What It Does | When to Use |
|---|---|---|
| dmux | tmux pane management for agents | Parallel agent sessions |
| Superset | Terminal IDE for 10+ parallel agents | Large-scale orchestration |
| Claude Code Task tool | In-process subagent spawning | Programmatic parallelism within a session |
| Codex multi-agent | Built-in agent roles | Codex-specific parallel work |
ECC Helper
ECC now includes a helper for external tmux-pane orchestration with separate git worktrees:
node scripts/orchestrate-worktrees.js plan.json --execute
Example plan.json:
{
"sessionName": "skill-audit",
"baseRef": "HEAD",
"launcherCommand": "codex exec --cwd {worktree_path} --task-file {task_file}",
"workers": [
{ "name": "docs-a", "task": "Fix skills 1-4 and write handoff notes." },
{ "name": "docs-b", "task": "Fix skills 5-8 and write handoff notes." }
]
}
The helper:
- Creates one branch-backed git worktree per worker
- Optionally overlays selected
seedPathsfrom the main checkout into each worker worktree - Writes per-worker
task.md,handoff.md, andstatus.mdfiles under.orchestration/<session>/ - Starts a tmux session with one pane per worker
- Launches each worker command in its own pane
- Leaves the main pane free for the orchestrator
Use seedPaths when workers need access to dirty or untracked local files that are not yet part of HEAD, such as local orchestration scripts, draft plans, or docs:
{
"sessionName": "workflow-e2e",
"seedPaths": [
"scripts/orchestrate-worktrees.js",
"scripts/lib/tmux-worktree-orchestrator.js",
".claude/plan/workflow-e2e-test.json"
],
"launcherCommand": "bash {repo_root}/scripts/orchestrate-codex-worker.sh {task_file} {handoff_file} {status_file}",
"workers": [
{ "name": "seed-check", "task": "Verify seeded files are present before starting work." }
]
}
Troubleshooting
- Pane not responding: Switch to the pane directly or inspect it with
tmux capture-pane -pt <session>:0.<pane-index>. - Merge conflicts: Use git worktrees to isolate file changes per pane.
- High token usage: Reduce number of parallel panes. Each pane is a full agent session.
- tmux not found: Install with
brew install tmux(macOS) orapt install tmux(Linux).
Related skills
More from affaan-m/ecc and the wider catalog.
docker-patterns
Docker and Docker Compose patterns for local development, security, networking, and multi-service orchestration.
documentation-lookup
Fetch current library and framework docs via Context7 MCP instead of relying on training data.
dotnet-patterns
Idiomatic C# and .NET patterns, conventions, and best practices for robust, maintainable applications.
dynamic-workflow-mode
Agent skill from affaan-m/ecc.
e2e-testing
Playwright E2E testing patterns with Page Object Model, CI/CD integration, and flaky test strategies.
ecc-guide
Navigate ECC's agents, skills, commands, hooks, and install profiles by reading live repository state.