Skip to content

feat: Claude Code-style team orchestration for Codex#1

Open
abhishekgahlot2 wants to merge 6 commits intomainfrom
feat/team-orchestration
Open

feat: Claude Code-style team orchestration for Codex#1
abhishekgahlot2 wants to merge 6 commits intomainfrom
feat/team-orchestration

Conversation

@abhishekgahlot2
Copy link
Copy Markdown
Owner

Summary

  • Adds Claude Code-style agent teams to Codex with tmux-native multi-pane support
  • Each agent runs as a real codex process in its own tmux pane
  • Agents coordinate through a shared JSON task board on disk — no send-keys hacks, no shared context window
  • 8 custom Rust crates (console-team, console-provider, console-runtime, console-tui, console-persist, console-plugin, console-security, console-cli) with 312 tests

What's included

10 team tools registered by default when Feature::TeamOrchestration is enabled:

  • team_create — spawn a team with agents in tmux split panes
  • team_add_task / team_claim_task / team_complete_task — shared task board with dependency graph and auto-unblock
  • team_list_tasks — query tasks with status + results inline
  • team_message / team_broadcast — persisted messaging (no tmux input injection)
  • team_status / team_shutdown_agent / team_cleanup — lifecycle management

Key design decisions:

  • Task results stored on the board via result field — lead reads outputs directly from team_list_tasks
  • Cross-process state sync: TeamState always reloads from disk so agents see changes from other processes
  • No tmux send-keys for message delivery — clean panes, same pattern as Claude Code teams
  • Teammate prompt instructs agents to use team_complete_task(result: "...") instead of messaging the lead

Files changed

Area Files
New crates codex-rs/console-team/, console-provider/, console-runtime/, console-tui/, console-persist/, console-plugin/, console-security/, console-cli/
Core integration core/src/team/handler.rs (825 lines), core/src/tools/spec.rs, core/src/features.rs
Upstream patches core/src/codex.rs, core/Cargo.toml, Cargo.toml, Cargo.lock

Test plan

  • cargo test -p console-team — 68 tests pass
  • cargo check -p codex-core — compiles clean
  • Live tested in tmux: 3-agent haiku team, tasks distributed, results collected on board
  • cargo test full workspace (CI)

Enable team_orchestration as Stable/default-on. Add --teammate-mode CLI
flag (auto/tmux/in-process). Add system prompt hint so model includes
agents array in team_create calls. Include all 8 console-* crates:
team (63), provider (75), runtime (28), tui (35), persist (23),
plugin (21), security (48), cli (14).

Key changes:
- Feature::TeamOrchestration: Experimental -> Stable, default true
- --teammate-mode flag on codex CLI, wired via CONSOLE_TEAMMATE_MODE
- System prompt teaches model to pass agents array to team_create
- 9 team tools register by default (no flag needed)
- Lead delegation hard enforcement (tool-surface + dispatch lock)
- Tmux pane lifecycle (spawn/close on shutdown/cleanup)
- Safe subslice_offset replacing unsafe pointer math in wrapping.rs
…sults

5 bugs fixed from live testing:

1. Stale cross-process state: try_load_from_disk() now always reloads
   from disk so agents see tasks added by the lead process.

2. Lead pane untitled: added select-pane -T @lead during tmux team
   creation so agents can find the lead's pane.

3. Cross-process thread_id: in tmux mode, skip send_prompt for message
   delivery since thread_ids from disk belong to other processes.

4. Input injection: removed all send_message_to_pane calls from
   team_message and team_broadcast handlers. Messages are persisted to
   shared state only — no tmux send-keys for any content.

5. Task results: added result field to TeamTask. team_complete_task
   now accepts optional result text so the lead reads outputs directly
   from the task board via team_list_tasks.
@abhishekgahlot2 abhishekgahlot2 force-pushed the feat/team-orchestration branch from a3c1a49 to dd2439f Compare February 8, 2026 07:55
- Run cargo +nightly fmt with imports_granularity=Item
- Remove unused dep serde_json from console-cli
- Remove unused dev-dep tokio from console-provider, console-runtime
- Add console-cli to cargo-shear ignore (not yet wired to any crate)
- Remove unused imports in collab.rs
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