Note

What the checks missed: notes on claude-orchestrator

claude-codecodexcursorantigravitycoding-agentscode-review

The note on the public-domain composer dataset mentioned the agent setup I built it with and promised it a note of its own. claude-orchestrator is a set of skills, hooks and session rules that lets Claude Code hand parts of its work to two other coding agents and keeps its sessions short. It is a snapshot of my own workflow, published in case parts of it are useful to someone else, not a general-purpose tool. Most of what it taught me is about checking: work an agent hands back can pass every check I set and still be wrong. Five cases below, after the setup and what it costs, followed by the provider terms and harness limits that now split the workflow across two tools.

The setup

Cursor is my editor, and Claude Code runs inside it as the main agent. Codex CLI and Cursor’s own headless agent run on their own subscriptions. On Claude’s Pro plan, Claude’s quota ran out first. Those subscriptions are flat-rate, and quota a pool hasn’t used by its reset is gone, so Claude keeps design, data checks and review and hands work with a written brief to whichever of the other two has quota to spare. Each delegate works in its own git worktree, a separate checkout of the repository, with the brief, a log and, where one exists, a check command. By default the other vendor’s agent reviews the result read-only, and Claude reads the diff and applies it uncommitted, so I decide what gets committed. On Cursor, delegated runs and reviews default to Cursor Auto (its Auto quota pool); when Codex quota is low, default Codex reviews and the Codex side of second-opinion queries swap automatically to the highest-rated non-Anthropic model on Cursor’s premium pool within twice the replaced Codex model’s per-task cost on Artificial Analysis (in recent runs, DeepSeek or Gemini models).

The rules push for one work item per session. At the end, the session writes the state, the decisions that still bind and the next step into a HANDOFF.md file, and the next session starts from that file instead of a long history. I can also have Claude write a field report on a session, and from time to time a session in the orchestrator’s own repository folds the reports into the rules. Most of the rules started that way.

How it compares

Each of the three tools can already run several agents on its own. Claude Code hands tasks to subagents, which can run in the background and, if asked, each in its own worktree, but they are Claude models and use Claude’s quota. Codex and Cursor run agents in the cloud, each task in its own workspace, and the result can become a pull request.

Other projects connect the agents. OpenAI’s Codex plugin for Claude Code lets Claude ask Codex for a review or hand it a task, in the same checkout. Claude Octopus, the closest relative I found, runs a task past up to twelve other providers, Codex and Cursor’s CLI among them, and a 75% consensus gate flags where they disagree. Superpowers is a set of skills for Claude Code, Codex, Cursor and other agents: it works through a plan with a fresh subagent per task, and reviews each task first against the spec, then for code quality. Larger orchestrators such as claude-squad and Agent Orchestrator run many agents side by side, each in its own workspace, and a person supervises them from a terminal or desktop app. Ruflo, formerly Claude Flow, has agents in Claude Code form swarms and keep a memory across sessions.

Mine is smaller and has a narrower aim. The other agents are there to put spare flat-rate quota to work and get a cross-vendor review, not to collect opinions from many models: a task goes to one delegate, on whichever subscription has quota to spare, and the other vendor reviews it. Claude, not a person at a dashboard, writes the brief and reads the diff, and I decide what gets committed. The rest is about the sessions rather than the agents: one work item each, a handoff file, field reports that become rules, and a cost log that includes sessions run without delegation. The repository’s survey of related projects lists more of them and what I took from them.

What it costs

I measure cost in units that weigh tokens roughly by their API price: input 1, cache read 0.1, one-hour cache write 2, output 5. The figures come from the main thread of 93 sessions in thirteen projects between 9 October and 11 November. The baseline was one 13-hour session on 9 October: 389 model calls, with the context growing to 779k tokens. Each call re-reads everything before it, so the cost of a session grows with the square of its length. That session averaged 67.4k units per call; the 92 sessions since averaged 23.6k, about 65% less. The sessions did different work, so this is a comparison per call, not a controlled result.

Idle time costs too. After an hour without a turn the prompt cache expires, and the next turn rewrites the whole context at twice the input price. That happened in 21 of the 93 sessions and came to 6.4% of all logged units (10.6M of 165.7M). On Claude’s Pro plan (until 26 October), the weekly quota still fell by about 3% per session, even in the best ones.

To test whether delegation itself lowered Claude’s usage, a hook ran a preregistered control-session experiment from 31 October to 14 November on Claude’s Max plan: each eligible new session outside the orchestrator’s own repository was randomly assigned to orchestrator mode, to claude-only (the same session rules, delegation blocked) or to vanilla (no injected rules, delegation blocked). Cursor Auto, not told which mode had run, rated which work items each session finished. Read on 22 November, after the 21 November freeze, the 282 analysed orchestrator sessions against the 55 claude-only sessions gave a ratio of 0.905 in Claude usage per finished item (weighted by API list prices, though the Max plan is flat-rate), with a 95% interval of 0.661–1.242. Because the interval includes 1, the result is inconclusive, and I claim no Claude saving from delegation.

On 23 November I removed the experiment hook, while keeping delegation as the default for cross-vendor review and to put spare flat-rate quota to work. In the quota log from 13 October to 22 November, Codex’s three full weekly windows since 28 October peaked at 96%, 100% and 100%, with 57, 54 and 47 delegated rounds and reviews; Cursor’s Auto pool peaked at 99% or more in its one fully logged month (18 October to 18 November), with 262 delegated rounds and reviews, at a median 0.19 points of the pool per round and 0.09 per review. Other work shares those pools — second-opinion queries, the experiment’s rater, my own sessions and Cursor as my editor — so the peaks show that the quota was used, not how much of it delegation accounted for or what would have expired without it.

What the checks missed

The review checked the brief. On 10 October, reviews twice approved work done to a wrong brief: one brief had a physically wrong acceptance criterion (a sum of squared amplitudes), the other broke a repository’s convention for a date column. Reviewers are now asked to challenge the brief’s criteria against the domain and the repository’s conventions, and Claude checks domain criteria before a launch. What did work was an independent check plus two readers. On 12 October, Codex built an 887-line data module with 48 tests in 16 minutes. The expected values came from a fixture Claude had built from an edition’s own files, not from the code being ported. Every check passed in the first round, and Cursor’s review and Claude’s own read still each found one bug the other missed.

Passing tests, wrong picture. On 20 October, a delegated build added pitch spelling and notation rendering to audiospylt, my Python toolbox for audio analysis. 1,084 tests passed and the review said APPROVE, but the labels in the rendered notation were reversed. For rendered output, Claude now looks at one real render before it accepts an approval, and the reviewer gets the image.

Matching counts, wrong labels. In our MEI edition of Buxtehude’s instrumental works, the lint corrections removed eight written accidentals that the 1903 print doesn’t have; the count matched, but they had the wrong label. The release notes of version 0.10.0 split the notes that changed from natural to sharp or flat in playback by cause: 4,753 through a regeneration of the accidentals the notation implies, 18 through corrections. That split, too, had to be measured again. The rules now say to re-measure a number, label or cause taken from a handoff or a report before it goes into a brief or a question to me.

A check that can’t fail. A checker for a tutorial printed “N failure(s)” and exited 0, so a delegated run verified by its exit code could never fail. Later, a scan of 114 logs of check commands that had exited 0 found one with FAILED (failures=1) in it: the command had piped the test output through tail -5, and without pipefail a pipe reports the exit code of its last stage. Before a checker guards a run now, Claude plants one failure and makes sure the checker exits non-zero, and the delegate tool warns when a check command’s pipe hides the exit code or a passing log contains a failure line.

Verbatim quotes, unsupported claims. Only about one session in nine gets a hand-written field report, so I tried having Cursor Auto write the lessons for the rest from compressed transcripts. A lesson was kept only if its evidence was found verbatim in the transcript. A Codex judge then compared the lessons with ten sessions that had hand-written reports. 11 of the 69 citations were unsupported: the quotes were real, but the lessons around them inferred a cause, put events in the wrong order or stretched a detail. The lessons also found only 41.7% of what the hand reports had. The bar was at least 50% found and at most 10% unsupported. A second round with a richer summary of each session and stricter instructions came to 40.1% found and 17.1% unsupported, this time mostly where one lesson merged several sessions’ details into one sentence. Before one last diagnostic run, I set a rule: a third round only if that run showed a credible way to 50%. It didn’t, and on 27 October I shelved the pipeline.

Terms, harnesses and porting

Running one workflow across several subscriptions runs into provider terms and data rights as often as technical limits. Earlier versions read all three providers’ quotas through a third-party tracker (openusage) and scraped Artificial Analysis’s leaderboard page for model ratings. In November I dropped both: on 7 November quota reads moved to each provider’s own CLI (codex app-server for Codex and claude -p /usage for Claude), and after a terms review I dropped the leaderboard scrape in favour of Artificial Analysis’s documented free API with a personal key and attribution, scrubbing the copied figures from the git history on 15 November. Cursor was the awkward case, because its CLI has no machine-readable quota command, only an interactive /usage screen. Driving that screen in a scripted terminal session (at most once every 30 minutes) raised a question under Cursor’s Terms of Service (barring scraping or data extraction) and Acceptable Use Policy (listing automated access via a script as a violation), so the reader shipped off by default. After I asked in Cursor’s forum, a staff member replied on 17 November that the automated-access clause targets bots and abuse, not someone automating their own workflow for personal use — on their own account, through the app, at a volume they could plausibly type themselves, without bypassing rate limits or giving others access. That addressed the practical question for my own setup, though a forum reply is not a legal opinion and an interactive screen can break on any CLI update, so the reader still ships opt-in.

Subscription terms also decide which harness can sit on top. Anthropic’s consumer terms and Claude Code compliance rules reserve subscription OAuth logins for ordinary use of Claude Code and other native Anthropic apps rather than third-party wrappers or external orchestrators, which are directed to API keys. Google’s Antigravity Additional Terms bar accessing the service through third-party software or tools and warn that breaches may suspend Antigravity or Gemini CLI access. On personal subscriptions, I therefore do not wrap Claude Code as a worker inside another orchestrator or wrap Antigravity from outside: Claude stays on top inside Claude Code (running in Cursor), and Google’s models stay inside Antigravity. In practice I now juggle two home setups rather than one loop over every subscription — Cursor with claude-orchestrator on one side, and Google Antigravity on the other for work with Google’s models (and Antigravity’s built-in Claude pool). OpenAI’s Codex CLI has so far been the most flexible harness to plug into an orchestration loop: it exposes a clean non-interactive runner (codex exec) with workspace sandboxing and session resume, a documented local protocol (codex app-server) for live rate limits, and even an official plugin for Claude Code. Cursor’s headless cursor-agent also works cleanly as a worker, aside from the /usage detour.

That split led to an ongoing port of the scripts and rules into a separate (currently private) plugin for Google Antigravity. The outer workflow ported well: the HANDOFF.md routine, the /next and /field-report skills, the brief and review templates, and the standard-library Python delegate CLI (installed as agy-delegate, keeping worktrees, patches, Codex and Cursor dispatch, Artificial Analysis routing and the core commit/push secret scanner) carried over with light edits, dropping claude -p as a worker to stay within Anthropic’s terms and separating cache and config directories so both installs coexist. Host-side quota reading actually got cleaner: Antigravity’s own agy -p /usage --output-format json returns exact remaining fractions for both its Gemini and built-in third-party pools directly, without interactive screen parsing or calling Claude’s /usage.

Everything tied to the host harness fought back. Hook events and schemas only partly match: the prompt hook moved to a different lifecycle event (PreInvocation) whose stricter JSON schema rejected extra metadata fields, while the shell guard kept PreToolUse and switched from matching Bash to run_command; neither the desktop-attention hook nor the control-session experiment hook has been ported. Because Antigravity runs shell commands inside a workspace sandbox by default, agy-delegate itself has to run outside the sandbox to manage worktrees under ~/.cache/ and spawn networked workers, inverting the permission boundary while keeping confirmation gates on pushes and unsandboxed workers. Context guards and session cost reports had to be rebuilt around Antigravity’s JSONL transcripts across separate storage folders (CLI, IDE and desktop app), filtering out child transcripts from native parallel workflows and multi-agent swarms and tracking mid-session model switches. Routing also splits in two, since Antigravity’s native subagents, parallel workflows and built-in Claude pool overlap with the external worktree CLI. The ongoing cost is drift: fixes landed in claude-orchestrator — wrapper-command scanning in the secret guard, date-independent Cursor usage tests, model-rating checks — now have to be ported to a second repository by hand.

Limits

This is one person’s workflow. The published repository assumes Linux and subscriptions to Claude, Codex and Cursor, with the Antigravity port maintained separately, and it changes whenever my workflow does; the figures here are from version 0.4.0 (23 November), and the other projects are described as their pages stood on 31 October. Outside the control-session experiment, the cost figures compare sessions that did different work; inside it, a blinding check showed that the rater’s inputs still partly revealed which mode a session had run in. The lessons come from the sessions I chose to write up.