Codex Antigravity Subagent MCP
Codex Antigravity Subagent MCP
This local stdio MCP server lets Codex delegate tasks to Google Antigravity CLI (agy).
Default model:
gemini-3.8-flash-highUser prompts and leading system slash commands are retained, with absolute workspace context appended for delegation.
/teamwork-preview <task>is supported; include a concrete task after the command.Long-running calls can be started in the background and polled by job ID.
Conversation IDs can be passed back to continue an earlier Gemini session.
Failed runs include structured
error_detailsand the exact per-jobdiagnostic_logpath. Model backend codes such asFAILED_PRECONDITION (400)are surfaced instead of AGY's generic termination message.By default, permission mode is set to
auto-approve(injecting--dangerously-skip-permissions) to prevent headless print mode from soft-denying tool confirmation. This default can be configured via theANTIGRAVITY_PERMISSION_MODEenvironment variable.If explicit confirmation is required, caller can pass
permission_mode: "default"or"sandbox". When a tool needs unprompted confirmation in default mode, such emptySUCCESSresponses are normalized toTOOL_CONFIRMATION_DENIED.
The bridge never invokes --disable-slash-commands. It uses AGY's required
--print=<prompt> form so later CLI options are not accidentally consumed as the prompt.
Per-job AGY logs are stored under logs/ so a bridge response can be matched to
the original backend error without scanning unrelated global CLI logs.
Version 1.3.0 changes:
Standalone Real-time Visual Monitor Dashboard: Built an elegant, dark cyberpunk-themed Web dashboard (
src/web/index.html) using zero external dependencies (pure native Node.jshttpand HTML5/CSS3/ES6).God's-eye View Grid: Renders individual subagent cards for all Teamwork roles (Orchestrator, Workers, Auditor) with live pulse status indicators, step counters, and highlighted active tool tags (
[run_command],[write_to_file]).Micro-Activity Timeline: Clicking any agent card seamlessly reveals its deep, step-by-step activity stream (
recent_activities), demystifying internal execution.Zero-Polling SSE Push: Uses Server-Sent Events (
/api/stream) for sub-second, live real-time state streaming directly to browsers.One-Click Controls & Log Streaming: Supports remote one-click cancellation for running/queued tasks and live diagnostic log tails.
New MCP Tool
open_dashboard: Codex can directly triggeropen_dashboardto automatically pop up the monitor dashboard in the user's default browser (http://localhost:3721).Standalone CLI & Concurrent Integration: Launchable independently via
npm run dashboard(node src/dashboard.mjs [--open]) or concurrently with MCP whenANTIGRAVITY_ENABLE_DASHBOARD=1.
Version 1.2.2 changes:
Complete Negation & In-progress Defense: Hardened
evaluateSubagentStatusto eliminate completion false-positives. Replaced isolated keyword matching (e.g. standalonehandoff.mdorVICTORY) with strict affirmation patterns. Messages containing negative or in-progress modifiers (e.g. "尚未生成,继续修复", "No VICTORY yet; still working") are categorically barred from being markedcompleted.Comprehensive Multi-tool Step Scanning: Inspects the entirety of
lastEntry.tool_callsrather than solely the first element. Any step containing active filesystem/terminal tools alongsidesend_messagestrictly remainsrunning.Queued Task Cancellation:
cancel_gemini_tasknow supports immediately cancelingqueuedtasks awaiting directory concurrency locks, transitioning their state directly tocancelledand short-circuiting execution when the lock becomes free.Restart Convergence for Queued Jobs:
restorePersistedJobsnow converges orphanedqueuedjobs intointerruptedupon server reboot, completely preventing zombie waiting states.Handshake Version Parity: Synchronized server handshake version to
1.2.2.
Version 1.2.1 changes:
Strict Evidence-Based Lifecycle Evaluation: Completely eliminated heuristic step count thresholds (e.g. step >= 30) and naive tool-name assumptions. Agents performing active tools (commands, edits) or asking questions remain strictly
running; only explicit completion evidence (finished handoffs/verdicts or parent kills) markscompleted. Inconclusive evidence defaults torunning/unknown.Working MCP Progress Notification Stream: Fixed progress notification delivery by resolving
progressTokenfrom both_metaandparams._meta, and invoking SDK-standardctx.mcpReq.notifyrather than unreachable methods.Accurate Action Tracking & Stale Text Invalidation: Tool activities now prioritize detailed parameters from
tc.args(e.g.toolSummary, command lines, filenames) over bare tool names. Consecutive tool executions reliably invalidate and overwrite prior text reflections incurrent_action.Deep Hierarchy Traversal (Depth >= 8): Expanded subagent cascade recursion depth to 8 with generalized conversation ID resolution and cycle protection, preventing truncation on 5+ tier agent chains.
Atomic Persistence & Consistent Restart State: Jobs are written atomically via temporary files (
.tmp-> rename) with automated quarantine for corrupted JSON records. Interrupted tasks post-restart consistently reportstate: interrupted,isError: true, andprogress.phase: interrupted.Directory Concurrency Lock: Added asynchronous per-workspace serialization lock to prevent conflicting concurrent Antigravity executions in the same working directory.
Handshake Version Parity: Synchronized server handshake version to
1.2.1.
Version 1.2.0 changes:
Deep Cascade Subagent Inspection (God's-eye View): Recursively penetrates and parses independent subagent conversation transcripts for all spawned Workers (e.g. Worker A, Worker B, Victory Auditor). Exposes fine-grained execution steps (
step), live micro-actions (current_action), active tools (last_tool), lifecycle statuses, and individual activity trails directly in thesubagentslist.Robust Subagent Parsing & Full-transcript Affinity: Automatically prefers un-truncated
transcript_full.jsonland adds tolerant parser fallbacks for models producing raw unescaped newlines within JSON string arguments.
Version 1.1.0 changes:
Real-time Progress & Activity Tracking:
get_gemini_taskpoll responses now include a structuredprogressobject detailing the current step number, active tool call, action summary, spawned subagents list, and recent activity stream, eliminating the "blind running" limitation.MCP Progress Notification Stream:
delegate_to_geminipushes live progress notifications every 2 seconds when caller provides aprogressToken.Lightweight Job Persistence: Jobs are continuously snapshot-persisted under
data/jobs/. Server restarts automatically restore historical task records and mark uncompleted sessions asinterrupted.Multi-path AGY Detection: Enhances Windows binary detection across common installation roots before falling back to system
PATH.
Version 1.0.3 reliability changes:
Final CLI success takes precedence over recovered model errors, which appear as
diagnostic_warning. Full logs are searched before display truncation.Diagnostic output redacts Bearer/Basic credentials and quoted token fields. Original AGY log files remain local raw diagnostics; do not share them unredacted.
Automatic retry is limited to temporary OS spawn errors (
EAGAIN,EBUSY) before any child PID exists. Missing or zero token usage is not proof that no tools ran. Model errors, including region errors, are returned without replay.Cancellation, timeout and output limits terminate the spawned process tree on Windows using its PID. Failure to terminate is reported explicitly. Synchronous MCP request cancellation, disconnects and normal termination signals also request task cleanup. This does not cancel independently hosted remote agents or survive a hard crash.
Each attempt has a unique log file. Timeout/cancellation status overrides partial CLI output; an abnormal process exit cannot report success.
The task cwd is explicitly added with
--add-dirand appended as absolute delegation context (keeping the leading slash command intact), so agents can resolve project inputs instead of substituting the default scratch workspace. This supplies workspace context, not a filesystem sandbox.
Offline validation: npm run test:diagnostics and npm run test:lifecycle.
Live validation (uses Gemini quota, writes only its temporary fixture workspace):
npm run test:live. The live report checks exact file contents; file output alone
does not prove that Teamwork launched multiple agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zamatewi-cell/antigravity-subagent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server