Add /codex:agent-team for tmux split-pane multi-agent spawning#149
Add /codex:agent-team for tmux split-pane multi-agent spawning#149MoizIbnYousaf wants to merge 1 commit intoopenai:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96a84b127b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| --- | ||
| description: Spawn a team of Codex agents in tmux split panes for parallel work | ||
| argument-hint: "[<count>] [--names <name1,name2,...>]" | ||
| allowed-tools: Bash(node:*) |
There was a problem hiding this comment.
Allow tmux commands in the agent-team slash command
The command is gated to Bash(node:*), but the same prompt later requires running tmux send-keys and tmux capture-pane to coordinate/monitor spawned agents. In command mode, those tmux calls will be blocked by tool permissions, so the post-spawn workflow described in this file cannot actually run. Please include tmux in allowed-tools (for example Bash(tmux:*)) so the command can execute its own documented orchestration steps.
Useful? React with 👍 / 👎.
Spins up N Codex instances as visible tmux split panes so you can coordinate parallel work from a single Claude Code session. I built this because the existing agent-team pattern (Claude Code subagents) doesn't give you visibility into what each agent is doing. Tmux panes fix that: you can watch all of them work at once.
What it does
/codex:agent-team 3creates a tmux layout with Claude Code in the left 30% and three Codex agents filling the right 70%. Each agent gets a colored border from an 8-color palette, a pane title visible in the border, andcodex --dangerously-bypass-approvals-and-sandboxlaunched inside it. The script waits for boot (~8s) and sends a confirmation Enter so agents are ready for tasks immediately.Layout follows the same split strategy as Claude Code's TmuxBackend: first agent takes 70% horizontal, additional agents alternate vertical and horizontal splits to keep things balanced.
Files
New:
scripts/lib/tmux-team.mjs(pane creation, layout, send/capture/kill)commands/agent-team.md(command definition)skills/agent-team/SKILL.md(orchestration patterns for task writing, file ownership, and monitoring)Modified:
codex-companion.mjs(agent-team + agent-team-kill subcommands)render.mjs(renderAgentTeamResult)tests/commands.test.mjs(assertions for the new command and skill)Usage
Testing
npm testpasses