Skip to content

Add /codex:agent-team for tmux split-pane multi-agent spawning#149

Open
MoizIbnYousaf wants to merge 1 commit intoopenai:mainfrom
MoizIbnYousaf:feat/agent-team-v2
Open

Add /codex:agent-team for tmux split-pane multi-agent spawning#149
MoizIbnYousaf wants to merge 1 commit intoopenai:mainfrom
MoizIbnYousaf:feat/agent-team-v2

Conversation

@MoizIbnYousaf
Copy link
Copy Markdown

@MoizIbnYousaf MoizIbnYousaf commented Apr 5, 2026

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 3 creates 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, and codex --dangerously-bypass-approvals-and-sandbox launched 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.

thisgif-compressed

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

/codex:agent-team 5
/codex:agent-team 3 --names alpha,bravo,charlie

Testing

  • npm test passes
  • Manually spawned 3 agents, sent tasks, captured output, killed panes

@MoizIbnYousaf MoizIbnYousaf requested a review from a team April 5, 2026 01:12
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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:*)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant