T3 Code's delegate_task: Orchestrating Claude, Codex & Antigravity Locally
The article explores T3 Code's delegate_task feature, which enables local coordination of multiple AI coding agents (Claude Code, Codex, Antigravity, Grok) through clean context handoff (no parent history), git worktree isolation, event-driven wake-up, and a local MCP server that abstracts CLI differences, demonstrated via a real-world token-alert implementation and a writing project.
Reading font

T3 Code's delegate_task: Cross-Vendor Local Agent Coordination
T3 Code ( https://github.com/pingdotgg/t3code) is an MIT-licensed open-source tool that enables a lead agent to spawn and coordinate child agents across different vendors' CLIs — claude, codex, agy (Antigravity), grok — entirely on the local machine. On macOS, installation is via brew install --cask t3-code. Version v0.1.12 adds DO_NOT_TRACK=1 to disable telemetry.
Background: Previous Approaches and Limitations
The author evaluated earlier multi-agent coordination attempts:
Wrapping Codex as an MCP or Skill for Claude Code — functional but clunky.
Claude Code Agent Teams (April 2025) — enables peer-to-peer messaging and shared task boards, but only within Claude Code.
Grok Bot group chat — runs in a cloud Debian VM, cannot access local repositories or test suites, and forcing a cloud agent to drive four local coding agents is architecturally inverted.
T3 Code adopts a pure local-control approach.
Case Study: Token Watcher Alert System
For adding a unified alert system to the author's open-source Token Watcher project, the orchestrator was Claude Opus 5.5 High . The prompt instructed T3 to create two parallel child tasks via delegate_task:
Add a configurable usage-alert system (web + menubar) to token-watcher. You coordinate. Use T3's delegate_task to create subtasks. First, parallel split: Codex / GPT-6-Astra implements the feature; Antigravity / Gemini 4 Carbon designs acceptance tests from the requirements. Codex writes code, Gemini only outputs test cases. After implementation, hand the requirements and actual diff to Grok / Grok 4.7 for read-only review. Finally, you run acceptance, handle findings, and summarize all results.
Core Design: Clean Context Handoff
Inspecting the v0.1.12 server source reveals a deliberate constraint. The delegate_task definition begins with:
Start one child agent with only task. No parent history.Each child starts with a blank slate — only a clean task description and role definition. The parent's prior turns (trial, error, chatter) are never transmitted. This saves tokens and prevents upstream model's mistaken assumptions from biasing the reviewer.
Contract Documents for Alignment
Without shared history, alignment relies on persisted contract documents. In the demo, Opus spent 2 minutes 9 seconds:
Running npm test on main branch to establish a green baseline.
Writing alerts-spec.md that locks down five rules: server-side judgment, default thresholds, interface 64KB ceiling, etc.
Passing the same document path to both Codex and Gemini simultaneously.
Worktree Isolation for Parallel Safety
The author's main branch held uncommitted changes in config.js and models.js (half-finished qwen code). Adding isolation: "worktree" to the delegation makes T3 spin up a clean worktree under ~/.t3/worktrees/ based on current HEAD, leaving uncommitted files untouched. Codex commits on its isolated branch; the main-branch files remain pristine.
Event-Driven Handoff Without Polling
T3 uses pure event wake-up; the orchestrator never sleep -polls. If a child hits ambiguity, it bubbles a question back to the parent for resolution. On completion, T3 tears down idle processes to reclaim memory, packages the finished child task, and wakes the parent. In the run, Codex submitted; Opus woke within seconds, read the diff in 46 seconds, flagged 3 latent issues, then paused awaiting Gemini's test cases and Grok's review before final wrap-up.
Protocol Abstraction via Local MCP Server
Effect-TS author Arnaldi noted: "Since I've started using T3 Code I no longer care which harness is used." T3 achieves this by launching a local HTTP MCP server with per-thread authentication. Every session, regardless of underlying CLI, receives the same declared capabilities — orchestrator_capabilities (model discovery) and delegate_task (cross-stack spawning). The kernel respects declared capabilities, not vendor names.
Adapter Details for Each CLI
Claude Code: Uses the official Agent SDK, mounts rules, and forces key tools to the front, bypassing the default ToolSearch hiding.
Codex CLI: Spawns codex app-server over JSON-RPC, with a dedicated MCP connection to prevent Code Mode from entering polling loops.
Antigravity CLI: Connects via agy acp protocol. Spoofs zed identity on older versions to unlock non-Gemini models. Tails local logs to detect background command hangs. Child permissions are strictly scoped by the parent; privilege escalation is intercepted.
Flexible Orchestrator Selection: Writing Project Example
Swapping the lead agent is trivial. For a book project, the author made Antigravity's Gemini 4 Neon High the orchestrator. After a few minutes of orientation, Neon launched three parallel children via delegate_task:
Antigravity polishes prose for chapters 1–15.
Codex verifies charts, formulas, and numerical typesetting.
Claude Code reviews code snippets and companion repos in chapters 12–14.
Quick model targeting is done in the input box with @ + model abbreviation.
When to Use Multi-Agent Coordination
The author cautions that a single Claude Code handles 99%+ of tasks; multi-agent orchestration is optional. It mainly serves developers who hold multiple subscriptions and want to utilize idle token quotas across vendors.
Repository and Version Notes
Upgrade to v0.1.12 and set DO_NOT_TRACK=1 to disable telemetry. The project remains MIT-licensed and fully local.
For questions about attribution, corrections or content rights, please contactand we will review it promptly.