antigravity-delegate
Creates isolated Git worktrees from HEAD and computes bounded unified diffs for task or workspace scopes, with controls to apply or discard worktree changes.
Delegates bounded child tasks to OpenAI Codex app-server with live streaming timelines, interactive approvals, followups, and isolated worktree experiments.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Disclaimer: This is an unofficial open-source community plugin. It is not affiliated with, endorsed by, or sponsored by Google, OpenAI, or T3 Tools Inc.
antigravity-delegate brings T3 Code's orchestration discipline directly into Google Antigravity as a self-contained MCP App plugin.
Your primary Antigravity agent stays in charge as the Brain, while bounded child tasks—cross-model quality-gate reviews, architectural second opinions, isolated Git worktree experiments, or heavy test-writing—run in OpenAI's official codex app-server with live streaming timelines, persistent side-pane tracking, bounded diffs, and interactive user approvals.
Why antigravity-delegate?
Opt-in per conversation: Normal chats stay direct and fast. Delegation activates only when you ask Antigravity to use Codex or enable collaborative mode in the current conversation.
No bloated context forwarding: Child agents receive a self-contained brief rather than your full parent chat transcript.
Independent cross-model quality gates: Run
role: "review"in a read-onlyplansandbox after refactors or/swarmworker runs to catch real bugs withfile:lineseverity rankings (Critical,Major,Minor) and a clear verdict.Native Antigravity MCP App UI: Combines inline chat task cards with a persistent
Delegateright side pane (aux_pane) and full-page workspace (global) that stays visible as chat tool steps collapse.Zero-polling wake-up: Background execution notifies the parent agent immediately on completion or approval pause over a private local Unix socket—no busy-wait polling loops.
Related MCP server: Antigravity MCP Bridge
Features
Orchestration & Roles
Two-tier control: You opt in per conversation; the main agent selects the best role per scenario:
review/research: defaults to a read-onlyplansandbox (approvalPolicy: "on-request"), letting inspection commands run smoothly while blocking filesystem writes and network access.implementation/test/design/general: defaults toworkspace-write(auto-accept-edits).
Two execution isolation modes:
shared: runs in your current workspace while snapshotting pre-existing dirty files (baselineDirtyFiles) sotask_diffseparates task edits from your unrelated uncommitted changes.worktree: creates a clean detached Git worktree fromHEAD(warns if the parent workspace has uncommitted edits) with explicit user-triggered Apply to Workspace and Discard Worktree controls.
Multi-turn & live steering: Continue any settled or interrupted thread with
task_followup, override model/effort/speed per turn, or redirect an active running turn mid-flight withdelivery: "steer".Idempotency & crash recovery: Supports
clientRequestIddeduplication and cleanly reconciles tasks interrupted by an MCP server restart so you can resume them via follow-up.
Zero-Polling Background Watcher (delegate-wait)
Every
delegate_task/task_followupdefaults tomode: "async"and returns a ready-to-runwatchCommand(plus optional synchronousmode: "wait"up to45s).State changes broadcast over
${PLUGIN_DATA}/events-<pid>.sock(0600) tobin/delegate-wait.mjs, waking the parent agent immediately onall_settledorapproval_needed.Supports multi-task parallel waiting (
--task-id id1:2,id2:1) with per-task:turnlocks.Outputs exceeding 16 KiB are written losslessly to disk (
fullSummaryPath) while inline results show a bounded head+tail preview.
Interactive MCP App UI
Bundled into a single self-contained HTML artifact (dist/plugin/ui/app.html) with no external network assets:
Executor Config Bar: Configure and persist panel defaults (
settings.json) for Provider, Model, Reasoning Effort (e.g.,medium–max/ultra), Speed (Standard/Fast), and Access Ceiling, with live CLI/auth status diagnostics and refresh.Persistent
DelegateSide Pane & Global Workspace (aux_pane/global):Filterable Delegate Lineage sidebar (
all,active,waiting,done) with live elapsed timers and file counts.Timeline tab: streaming commands, file changes, reasoning, MCP tools, web search, compaction, and warnings/errors (budgeted per response to stay well under Antigravity's 1 MiB MCP payload cap).
Diff tab: bounded unified Git diff with per-file stats, clickable file links that open in Antigravity's side pane (
com.google.antigravity/toggle-aux-pane), and ashared-mode Task files vs. Workspace scope toggle.Summary tab: full summary preview, one-click Open full summary, and context/token usage breakdown.
Interactive Approvals & Elicitation: Approve, Approve Session, Decline, or answer structured Codex user-input prompts (including secret inputs and custom text) inline or in the panel.
User-triggered Handoff: Send to Chat (
sendMessage) and Attach Context (updateModelContext) trigger strictly on explicit clicks.
Architecture
flowchart LR
Host["Antigravity Host + Chat Model"] -->|MCP stdio / JSON-RPC| Server["server.mjs (MCP Server)"]
Host -->|MCP App iframe| UI["ui/app.html (Single-File React UI)"]
UI -->|app_* tools| Server
Server --> Orch["Orchestrator + TaskStore + SettingsStore"]
Orch -->|ProviderAdapter| Codex["CodexAdapter (codex app-server stdio)"]
Orch -->|task.updated| Bus["LocalEventBus (events-PID.sock)"]
Wait["delegate-wait.mjs (Background Watcher)"] -.->|Unix socket + turn lock| Bus
Host -->|run_command background| WaitQuick Start
Prerequisites
Google Antigravity (with MCP Apps / plugin support)
Node.js 22+ and pnpm
Official OpenAI
codexCLI installed inPATHand signed in:
codex --version
codex loginBuild & Install Locally
git clone https://github.com/JamesGZM/antigravity-delegate.git
cd antigravity-delegate
pnpm install
pnpm run typecheck
pnpm test
pnpm run build
pnpm run install:localpnpm run buildcompiles the single-file UI (dist/plugin/ui/app.html), bundlesdist/plugin/bin/server.mjsanddist/plugin/bin/delegate-wait.mjsviaesbuild, and copiesplugin-meta/and docs intodist/plugin/.pnpm run install:localinstallsdist/plugin/cleanly to~/.gemini/config/plugins/antigravity-delegate/without modifying~/.gemini/config/config.json.
After installing or updating, restart/reload the antigravity-delegate MCP server in Antigravity (or start a new chat) so the host picks up the latest bundle and skill instructions.
Usage Examples
Ask Antigravity naturally in any project chat:
Independent Quality-Gate Review
"Delegate an independent Codex quality-gate review of my uncommitted git diff in read-only plan mode."
Collaborative Brain + Codex Mode
"Enable collaborative Codex mode for this conversation so you act as Brain and dispatch Codex for reviews or heavy subtasks."
Isolated Worktree Experiment
"Have Codex prototype the refactor in an isolated Git worktree (
role: implementation) and show me the diff before applying anything."Open the Persistent Side Pane
"Open the Delegate panel to configure the default Codex model, effort, and speed, or inspect running task diffs and approvals."
The main agent follows the bundled orchestration skill (SKILL.md), probes orchestrator_capabilities once, launches delegate_task, opens the persistent Delegate right side pane via open_delegate_panel, and waits cleanly via delegate-wait.mjs.
MCP Tool Reference
Model-Visible Tools (8)
Tool | Purpose |
| Probes local CLI readiness, auth status, models, dynamic options ( |
| Starts a bounded child task with |
| Reads compact status, |
| Paginates task timeline with UTF-8 byte budgets ( |
| Computes bounded unified Git diff and changed files ( |
| Sends a follow-up |
| Interrupts and cancels an active task cleanly. |
| Opens or focuses the persistent |
App-Only Tools (11, hidden from models via visibility: ["app"])
Used exclusively by the embedded MCP App UI over callServerTool:
app_list_tasks, app_get_task, app_get_diff, app_respond_approval, app_followup_task, app_get_capabilities, app_get_settings, app_update_settings, app_cancel_task, app_apply_worktree, app_discard_worktree.
Runtime Modes & Access Ceiling
antigravity-delegate enforces T3 Code's monotonic permission ceiling: a child task can never escalate beyond the Access Ceiling configured by you in the Delegate panel (settings.json).
Mode | Codex | Codex | Sandbox ( | Sandbox ( |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Never emits --dangerously-bypass-approvals-and-sandbox or approvalPolicy: "never".
Security & Compliance
Zero-touch authentication: Auth state is queried strictly through
codex app-server's officialaccount/readRPC. The plugin never reads, parses, stores, or logs~/.codex/auth.json, OAuth tokens, or API keys.Official protocol only: Spawns only your locally installed official
codexbinary (codex --versionandcodex app-server --listen stdio://).Sanitized persistence & path safety: Data directory (
0700), task/settings files (0600), and Unix sockets (0600) stay private to the user;taskIdinputs are validated against^[a-zA-Z0-9_-]{1,128}$to block path traversal.Strict UI isolation: Single-file HTML bundle with no external network requests or remote scripts;
sendMessageandupdateModelContextfire only on explicit user clicks.
Project Structure
├── plugin-meta/
│ ├── assets/logo.svg
│ ├── mcp_config.json # Antigravity MCP server launch config
│ ├── plugin.json # Plugin manifest & suggested prompts
│ └── skills/antigravity-delegate/SKILL.md
├── scripts/
│ ├── build-plugin.mjs # Vite single-file UI + esbuild server/watcher bundle
│ ├── gen-codex-types.mjs # Optional Codex app-server TS definition generator
│ └── install-local.mjs # Copies dist/plugin/ to ~/.gemini/config/plugins/
├── src/
│ ├── adapters/codex/ # CodexAdapter, JSON-RPC client, runtime mode mapping
│ ├── cli/delegate-wait.ts # Socket-backed zero-polling watcher CLI
│ ├── core/ # Orchestrator, TaskStore, SettingsStore, EventBus, Git worktree
│ ├── server/index.ts # MCP Server & MCP App tool/resource registration
│ └── ui/ # React MCP App UI (InlineTaskCard, PanelWorkspace, DiffViewer, etc.)
└── tests/ # Vitest integration & unit test suitesDevelopment & Testing
pnpm run typecheck # Type-check server, core, CLI, UI, and tests
pnpm test # Run Vitest unit & integration suites
pnpm run build:ui # Build single-file UI bundle only
pnpm run build # Build complete dist/plugin/ artifact
pnpm run install:local # Install dist/plugin/ locally
pnpm run gen:codex-types # Optional: regenerate Codex protocol types via local codex CLIAdding Another Provider
The orchestrator talks to providers through ProviderAdapter. To support another coding CLI or runtime alongside CodexAdapter, implement ProviderAdapter (probeCapabilities, startTurn, optional steerTurn/unloadThread, interruptTurn, respondApproval, dispose) and register it in src/server/index.ts.
Acknowledgements
Architecture and orchestration semantics draw inspiration from pingdotgg/t3code (MIT License). See NOTICE for attribution details.
License
Licensed under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Project board for ChatGPT, Claude and coding agents, with scoped MCP access to projects and tasks.
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
A task list shared by you and your coding agents (Claude Code, Cursor, Codex and any MCP client). Agents plan each task into steps, report live progress to a board, and block on questions you answer from your phone.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables Codex to delegate bounded code analysis, review, isolated edits, multimodal research, and native image generation to supervised Antigravity workers, with queued execution, retries, and inspectable patches.232MIT
- AlicenseBqualityBmaintenanceEnables delegating coding tasks to the official Antigravity CLI from any MCP client, with task listing, model selection, streamed event tracking, cancellation, and resumable sessions. Runs each task against an isolated copy of the repository so results can be previewed, tested, and only integrated into the original after explicit user confirmation.23MIT
- AlicenseAqualityBmaintenanceEnables Claude Code or any MCP client to delegate hands-on coding work to OpenAI Codex over a persistent app-server process, keeping long-lived threads with follow-ups, async polling, approvals, steering, and interrupts. Supports native code review, resuming existing sessions, structured output, and parallel worktree-isolated tasks.1042 npm1MIT
- AlicenseAqualityBmaintenanceEnables Antigravity to delegate coding, debugging, refactoring, and code reviews to OpenAI Codex through a persistent app-server bridge, with thread continuity, approvals, isolated worktrees, and multimodal inputs.11MIT