A Claude Code skill for coordinating multiple AI coding agents (Claude Code + Codex) through tmux, with automatic task tracking, independent evaluation, and structured context management.
If you use both Claude Code and OpenAI Codex CLI, this skill turns your main Claude Code session into a dispatcher that:
- Opens tmux panes and dispatches tasks to Codex workers (code) and Claude Code workers (browser verification)
- Tracks every task in persistent markdown files so nothing gets lost
- Runs an independent Evaluator loop on UI tasks to catch bugs before you review
- Manages worker context lifecycle (compact vs. handoff based on remaining context)
- Sends Telegram notifications on task completion (optional)
- Enforces file locking for parallel work without merge conflicts
You (terminal)
|
v
Dispatcher (main Claude Code session)
|
|-- reads/writes --> task files (docs/agent-memory/tasks/YYYY-MM-DD.md)
|-- reads/writes --> lock files (docs/agent-memory/LOCKS.md)
|
|-- tmux send-keys --> Codex pane 0 (code + tests + commit)
|-- tmux send-keys --> Codex pane 1 (parallel task)
|-- Agent tool -----> Claude Code evaluator (independent UI verification)
|
v
Notifications (git hook + Telegram + patrol script)
Based on Anthropic's Harness Design for Long-Running Apps:
-
Generator-Evaluator Separation: Codex writes code, a separate Claude Code agent independently verifies UI changes. Self-evaluation tends toward leniency; independent evaluation catches real bugs.
-
Context Reset > Compaction: When a worker's context drops below 15%, it writes a structured handoff file and a fresh worker continues. Compaction degrades quality; reset preserves it.
-
Two Enters Rule: tmux
send-keysrequires exactly 2 Enters to submit a task to Codex/Claude Code (1st enters the input, 2nd submits). Pressure-tested on Codex v0.118+. -
User Verification is Final: Even when the Evaluator passes, the user must explicitly approve before a task is marked complete. The Evaluator reduces issues reaching the user, it doesn't replace the user.
- Claude Code CLI
- OpenAI Codex CLI (v0.118+)
- tmux
- Node.js 18+ (for Playwright verification)
- Telegram bot token (for notifications)
- Playwright (for headless UI verification)
# Create the skill directory
mkdir -p ~/.claude/skills/tmux-orchestrator
# Copy the skill
cp skill.md ~/.claude/skills/tmux-orchestrator/skill.mdOpen skill.md and replace all occurrences of <YOUR_PROJECT_DIR> with your actual project path:
sed -i '' 's|<YOUR_PROJECT_DIR>|/path/to/your/project|g' ~/.claude/skills/tmux-orchestrator/skill.mdAdd to ~/.codex/config.toml so Codex doesn't prompt for approval:
[projects."/path/to/your/project"]
trust_level = "trusted"
approval_policy = "never"
sandbox_mode = "danger-full-access"mkdir -p /path/to/your/project/docs/agent-memory/tasks
mkdir -p /path/to/your/project/docs/agent-memory/signalsSee scripts/notify-telegram.sh for setup instructions.
See scripts/tmux-patrol.sh for background monitoring.
Start a Claude Code session and tell it:
You are a tmux dispatcher. Read the tmux-orchestrator skill and manage my project at /path/to/project.
Or simply describe your tasks — if the skill is installed, Claude Code will activate it when you mention dispatching, parallel workers, or tmux.
| You say | Dispatcher does |
|---|---|
| "Fix the login bug and add dark mode" | Opens 2 Codex panes, dispatches both in parallel |
| "s" or "status" | Reports all pane status + pending tasks |
| Any bug description | Immediately dispatches to a new pane |
You describe a task
-> Dispatcher writes to task file: - [ ] task | pane: P0
-> Dispatches to Codex pane
-> Codex completes + commits: - [x] task
-> (If UI task) Evaluator independently verifies
-> You confirm OK: - [✅] task
Replace notify-telegram calls in the skill with your preferred notification tool (Slack, Discord, desktop notification, etc.).
By default, the Evaluator only runs for UI tasks. Adjust the routing table in the "Evaluator Loop" section of skill.md to match your project's needs.
The default context management tiers are:
- >30%: Normal operation
- 30-15%: Compact (sufficient for simple tasks)
- <15%: Force handoff + new pane
Adjust these based on your typical task complexity.
tmux-orchestrator/
├── skill.md # Core skill (install to ~/.claude/skills/tmux-orchestrator/)
├── README.md
├── scripts/
│ ├── notify-telegram.sh # Optional Telegram notification helper
│ └── tmux-patrol.sh # Optional background pane monitor
└── templates/
├── task-file.md # Daily task file template
├── handoff.md # Context handoff template
└── locks.md # File lock table template
The dispatcher (your main Claude Code session) never writes code itself. It:
- Talks to you
- Opens/closes tmux panes
- Sends tasks via
tmux send-keys - Reads task files and pane output to track progress
- Reports status when you ask
Each Codex pane:
- Receives a task with clear acceptance criteria
- Implements the fix/feature
- Runs TypeScript checks (
tsc --noEmit) - Runs related tests
- Runs Playwright verification (if UI change)
- Commits to the dev branch
- Sends notification
After Codex commits a UI change:
- Dispatcher spawns a Claude Code agent in the background
- Agent opens the page via browser automation (CDP)
- Tests edge cases, checks console errors, takes screenshots
- Reports PASS/FAIL back to dispatcher
- If FAIL: feedback goes to Codex for another attempt (up to 3 rounds)
When multiple panes work in parallel:
- Each pane writes which files it will modify to
LOCKS.md - Before starting, a pane checks for conflicts
- If conflict: waits (checks every 2 min) instead of proceeding
- On completion: releases the lock
MIT