Antigravity writes the code.
Codex checks it. The loop runs until it really passes.

Agent Orchestrator is a small local Python tool. It hands a coding task to Antigravity through Agent-Bridge, waits without burning LLM tokens, has Codex verify the result against your acceptance criteria, and sends concrete feedback back until the work passes, fails for good, or runs out of time.

Python 3.11 · standard library only SQLite, crash-safe 300+ tests Verified with the real tools MIT license

How it works

One loop, with a single 45-minute budget for the whole task, covering every attempt, every wait and every verification. There is no retry counter: a task stops only when it passes, fails for good, is cancelled, or the budget runs out.

The orchestration loop A task is dispatched to Antigravity, the orchestrator waits without an LLM, collects the git diff, and Codex verifies it. PASSED completes the task, FAILED stops it, RETRY_NEEDED sends the feedback back to dispatch. One task budget: 45 minutes, anchored on the saved start time (survives restarts) Task SQLite Dispatch Agent-Bridge → Antigravity Wait no LLM polling Verify Codex + git diff PASSED ✓ FAILED ✗ RETRY_NEEDED: the verifier's feedback becomes the next prompt

Built to be left alone

The hard part of running coding agents unattended is not the happy path. It is crashes, cancels, flaky output and "passed" that was never really checked.

↻

Unlimited retries, one budget

RETRY_NEEDED loops back with the verifier's concrete feedback. A single 45-minute budget, saved in the database, bounds the whole task, even across restarts.

✓

"Passed" has to be proven

The verdict comes only from Codex's final answer. Exit code ≠ 0 means failed. Required tests need real evidence: the actual command, its exit code and the runner's summary line. The verifier may not touch your files.

⟲

Crash-safe recovery

recover resumes, verifies or closes interrupted tasks and never starts the same work twice. Tasks owned by a dead Bridge process are marked, not re-run.

■

A cancel always wins

The database is the source of truth. A cancel from another terminal or the dashboard stops the worker within about 10 seconds and can never be overwritten by a late "completed".

◉

See what the agent is doing

A live feed shows each step of the agent: files read, commands run, test results. Follow it in the terminal, with watch, or in the local dashboard.

⚙

A hardened Bridge client

It survives timeouts, noisy or broken output, huge stderr streams and process crashes. Closing always finishes in bounded time and leaves no stray processes.

A real run, replayed

This is the actual live log of a real run on a throwaway repo: calc.py had a deliberate bug (add() subtracted). Antigravity reads the files, sees the test fail, fixes the code and re-runs the tests. Codex then verifies it independently. The tool's own interface is in Russian; only file paths are shortened.

orchestrator_logs/6732a197.log

  

Total: about 70 seconds from dispatch to a verified PASSED. Every line above is real output. Times are local.

Tested against the real tools

Over 300 automated tests use mocks and fake programs. Mocks can be wrong, so every claim was also checked with real Agent-Bridge, Antigravity and Codex on a sandbox repo. The real runs found four bugs that all the mocked tests had missed.

Real checkResultWhat it proved or fixed
First dispatchbug fixedThe Bridge requires request_id to be a UUID. Now a deterministic UUIDv5 per attempt.
Worker startbug fixedagy rejects a leveled model (…-high) plus a separate effort. The model name is now the only source of the level.
Fix a bug end to endpassedReal Codex event format recognised. Test proof extracted from the real command (pytest, exit 0, "1 passed").
Live feedbug fixedReal transcript events are nested. The feed now shows readable steps instead of bare event names.
Cancel while workingpassedStopped 9.9 s after the cancel. The agent's own log ends with cancelled. No file changed.
Orchestrator crashpassedThe Bridge cancels the task and stops its worker. recover closes the task without re-running it.
Hard crash of everythingpassedThe new Bridge marks the task bridge_restarted. recover fails it cleanly, with nothing left running.
Cancel of a finished taskbug fixedThe CLI now says the task is already finished instead of claiming a cancel was recorded.

Local dashboard

Run agent-orchestrator dashboard --open to follow every task in your browser: status, attempt, time left, verifier notes, the event history and the live agent journal. It runs only on your own computer, reads your local database, and never starts an agent itself.

The local dashboard: a list of tasks on the left; on the right a completed task with verdict passed, the verifier's notes, its events and the live Antigravity journal

Security by design: it listens on 127.0.0.1 only, rejects foreign Host headers (DNS rebinding), inserts all task text as plain text, and the one write action, cancel, requires a secret token created at startup.

Drive it from your Codex chat (MCP)

The orchestrator ships a small local MCP server. Add it to Codex in VS Code and you can start a task, check on it and read the report from the chat you are already in, without a second terminal. The chat only controls the work. Writing and verifying are still done by Antigravity and a separate Codex run.

You ask in the chat

Something like: "Run via the orchestrator: fix the bug in calc.py, tests must pass." Codex calls the start_task tool with your prompt, the acceptance criteria and the absolute path of the project.

A background worker takes over

The server saves the task in SQLite, starts a separate worker process with its input closed, and returns the task ID at once. The worker runs the normal loop: dispatch, wait, verify, retry.

You check when you like

get_status and get_report only read the database, so they answer instantly and never disturb the run. The task is shown with the same status the CLI and the dashboard use.

Verification stays independent

A fresh codex exec checks the diff and runs the tests. It does not see your chat, and your chat cannot approve its own work.

ToolWhat it does
start_taskCreate a task and start it in the background. Returns the ID immediately.
get_statusStatus, attempt, verdict and error. Shows whether the owning process is still alive.
list_tasksThe most recent tasks, up to 50.
get_reportThe finished task's report: verdict, test evidence, diff and history.
cancel_taskRecord a cancel. The running worker stops within about 10 seconds.
recover_taskClose or verify a task whose process died. It never sends the work to the agent again.

Add it to Codex

Reinstall the package with python -m pip install -e ., then add this to your Codex MCP settings (or ~/.codex/config.toml) and restart the extension. Use your own absolute paths.

[mcp_servers.agent_orchestrator]
command = "<path-to-python>/python.exe"
args = ["-m", "agent_orchestrator.mcp_server", "--config", "<repo>/config.toml"]
cwd = "<repo>"
⧉

Survives a window restart

The worker is its own process, not a thread of the chat's server. On Windows it asks to leave the extension's job object, and falls back if the system refuses.

♥

Knows if its owner died

Each running task records its owner process and a heartbeat. get_status reports owner_alive; a dead owner can be recovered, an unknown one is never touched.

1

One task at a time

A second start_task is refused while one is active, so two agents never edit the same project at once.

Honest limits: the heartbeat proves the process is alive, not that the agent is making progress; the 45-minute budget covers a stuck run. The worker was tested by killing it and recovering with fake tools. A real restart of VS Code has not been tested yet, so whether the extension kills child processes is still an open question.

Quick start

Windows-first, standard library only. You need Python 3.11+, Agent-Bridge on your PATH, the Antigravity CLI (agy) and the Codex CLI.

Install

git clone https://github.com/QosmuratSamat0/agent-orchestrator
cd agent-orchestrator
python -m pip install -e .

Configure

Copy config.example.toml to config.toml and set the paths to codex.exe and agy.exe. Defaults: a 2700 s task budget and live progress every 10 s.

Run a task

agent-orchestrator run -t "Fix add" \
  -p "Fix the bug in calc.py" \
  -a "pytest must pass" \
  -d C:\path\to\your\repo

Watch it

agent-orchestrator watch
agent-orchestrator dashboard --open
CommandWhat it does
runCreate a task and run the full loop
submitQueue a task without running it
status / listShow one task or all tasks
watchFollow a task live in the terminal (read-only)
dashboardLocal web dashboard on 127.0.0.1
cancelCancel a task; the running orchestrator stops the worker
recoverResume or close tasks interrupted by a crash
reportPrint a task's diagnostic report
modelsShow available Antigravity models and routing

Every finished task also writes orchestrator_report_<id>.md into its working directory: verdict, test evidence, git diff and the full event history.