Catalog
affaan-m/dmux-workflows

affaan-m

dmux-workflows

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.

NewUpdated Oct 30, 2026

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 n to create a new pane with a prompt
  • Press m to 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

  1. Independent tasks only. Don't parallelize tasks that depend on each other's output.
  2. Clear boundaries. Each pane should work on distinct files or concerns.
  3. Merge strategically. Review pane output before merging to avoid conflicts.
  4. Use git worktrees. For file-conflict-prone work, use separate worktrees per pane.
  5. 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:

# Use the configured plugin root or standalone install (~/.claude or
# $CLAUDE_CONFIG_DIR). For a reviewed and explicitly authorized ECC checkout:
# export CLAUDE_PLUGIN_ROOT="/absolute/path/to/reviewed/ECC"
ECC_ROOT="${CLAUDE_PLUGIN_ROOT:-${CLAUDE_CONFIG_DIR:-$HOME/.claude}}"
[ -f "$ECC_ROOT/scripts/orchestrate-worktrees.js" ] || { echo "ECC scripts not found in the selected root (set CLAUDE_PLUGIN_ROOT to an authorized ECC checkout)" >&2; exit 1; }
node "$ECC_ROOT/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 seedPaths from the main checkout into each worker worktree
  • Writes per-worker task.md, handoff.md, and status.md files 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) or apt install tmux (Linux).
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

79/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

78

Quality

78

Clarity

82

Completeness

76

Summary

This skill provides structured guidance for orchestrating parallel AI agent sessions using dmux, a tmux-based pane manager. It teaches patterns for dividing complex tasks across multiple agent harnesses (Claude Code, Codex, OpenCode, etc.) and includes best practices for coordination, git worktree isolation, and resource management. The skill also documents an ECC helper script for programmatic orchestration with branch-backed worktrees.

Detected Capabilities

tmux session managementgit worktree creation and managementspawning multiple AI agent processesfile I/O (task.md, handoff.md, status.md)environment variable access (CLAUDE_PLUGIN_ROOT, CLAUDE_CONFIG_DIR, HOME)node.js script executionbash command executionprocess spawning and coordination

Trigger Keywords

Phrases that agents use to match this skill to user intent.

multi-agent orchestrationparallel agent tasksdmux pane managementdivide and conquer workflowcross-harness coordinationgit worktree isolationagent parallelismtask orchestration

Risk Signals

INFO

Environment variable fallback chain accessing $HOME

ECC Helper section, environment setup
INFO

External tool installation from github.com/standardagents/dmux referenced but not embedded

Install section
WARNING

Node script execution from user-configurable path (CLAUDE_PLUGIN_ROOT)

ECC Helper section, orchestrate-worktrees.js invocation
INFO

Git worktree operations on shared repository without explicit merge conflict handling

Git Worktree Integration section

Referenced Domains

External domains referenced in skill content, detected by static analysis.

github.com

Use Cases

  • Running multiple AI agents in parallel on independent subtasks
  • Splitting complex work across specialized agent roles (e.g., researcher + implementer)
  • Code review from multiple perspectives simultaneously
  • Isolating parallel file changes with git worktrees to avoid merge conflicts
  • Large-scale task orchestration across 10+ agents using Superset
  • Cross-harness coordination (e.g., Claude Code for security review, Codex for performance)

Quality Notes

  • Strengths: Five concrete workflow patterns with clear use cases (research + implement, multi-file feature, test + fix, cross-harness, code review)
  • Strengths: Best practices section clearly prohibits dependent task parallelization and emphasizes resource awareness
  • Strengths: Troubleshooting section covers common failure modes (unresponsive panes, merge conflicts, token usage)
  • Strengths: ECC helper example includes error handling (file existence check with clear error message)
  • Strengths: seedPaths documentation clarifies when to use file overlay for untracked local files
  • Opportunity: Installation instructions defer to external repository without checksums or verification steps
  • Opportunity: No explicit documentation of what 'merging' output means or how to resolve contradictions between pane outputs
  • Opportunity: Token cost warnings present but no concrete guidance on monitoring or limiting API calls per pane
  • Opportunity: Examples use fictional paths and tasks; could include a complete walkthrough with sample commands and expected output
Model: claude-haiku-4-5-20251001Analyzed: Oct 30, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v1.4

    Content updated

    ✦ AIECC Helper now requires explicit plugin root configuration with fallback to standard installation paths.

    2026-10-30

    LATEST
  2. v1.3

    Content updated

    ✦ AINo behavioral changes detected.

    2026-07-14

    View This Version
  3. v1.2

    Content updated

    ✦ AIAdds LICENSE file; SKILL.md body unchanged.

    2026-04-20

    View This Version
  4. v1.1

    Content updated

    ✦ AIInstallation instruction changed from npm shortcut to manual review of repository.

    2026-04-12

    View This Version
  5. v1.0

    Seeded from github.com/affaan-m/everything-claude-code

    2026-03-16

    View This VersionInitial version

Use affaan-m/dmux-workflows in your dev environment

Command Palette

Search for a command to run...