Four subscriptions, one manager

How work is routed across Claude, Codex, Grok and Gemini on agentbox

Last updated

01The idea

Claude Code is the manager. It plans, decomposes, gates and merges — and it hands almost everything else out. Delegation is always on: work leaves because another model is better suited or because it can run in parallel, never because quota ran low. Quota changes how much goes out, not whether.

The goal is throughput. Token savings are a byproduct, never the target.

One rule keeps it honest: workers handle leaf nodes only. They never pick their own subtasks and never talk to each other. Everything routes through the manager.

02Who gets what

WorkGoes toWhy
Planning, decomposition, gatingClaudeAlways. The manager owns the task graph.
ImplementationCodexBest worker on the box.
Correctness reviewCodexComplementary blind spots to Claude's.
Large refactors, taste review, debuggingClaudeUntil posture tightens.
Security and exploit analysisGrokTrack record improved sharply after the 4.6 release.
Bulk mechanical edits, UI against a specGeminiFastest and cheapest.

Resolved by orchestrator/route.py <kind> against routing.json, which accounts for current posture. 13 task kinds are defined.

03Capacity postures

capacity (MCP) or meter.py --probe returns one of three:

  • plenty — route by fitness, parallelise freely
  • tightening — hand out implementation too, not just review
  • reserve — planning and gating only; everything executable goes out

Reserves held back: Claude 5% hourly and 20% weekly (5% on weekends) · Codex 25% · Grok 25% · Gemini none.

Grok and Gemini publish no quota at all, so a refusal is the only limit signal that exists for them. breaker.py trips on one and reroutes to Codex until it clears.

04Review policy

On any diff, review_plan (MCP) returns the tier and reviewers with no model call. Reviewers are then dispatched in parallel.

  • Docs-only and comment-only changes get no review.
  • Anything touching auth, crypto, payments, permissions, migrations, deps or CI gets a Grok security pass regardless of size. A two-line auth change is not a small change.
  • Review is capped at 2 rounds. Agents ping-ponging reviews is a documented cost blowout.
  • Never prompt a reviewer with “only report high-severity issues” — both vendors document that it destroys recall. Ask for full coverage, filter afterwards.

Claude and Codex have complementary, not redundant, blind spots. Overlap is signal; disagreement is not noise.

05Know your workers

Codex

Implementation, correctness review, latency-sensitive work.

  • Over-hardens: invents threat models nobody asked for. Scope it explicitly.
  • Context is capped at 372K, not the advertised 1M. Never send big-repo work.
  • Serializes tool calls it should batch: 27–45% quota inflation.
  • Unattended, it auto-accepts its own answer to a clarifying question after 60 seconds, and this cannot be disabled. Never let an unattended run ask questions.
  • One CODEX_HOME per concurrent worker, or auth.json refresh races.

Grok

Security analysis, exploit work, greenfield from a brief.

  • High recall, low precision. Findings need a filter pass before action.
  • Under-plans. Do not hand it multi-step strategy.
  • OAuth token expires around 8 hours; Grok access dies overnight without a refresh.

Gemini (via Antigravity)

Bulk mechanical edits, UI against an existing spec.

  • Give it nothing requiring judgement. It hallucinates.
  • Refuses security requests at the agent layer; route those to Grok.
  • Weekly quota cliff. Best-effort only, never on the critical path.

Claude

Planning, decomposition, large refactors, taste.

  • Over-does. Litters code with notes-to-self comments that become dead context.

06What was built on 2026-08-25

Four changes. Each was verified, not assumed.

Codex remote control now starts at boot.

A system-level systemd unit at /etc/systemd/system/codex-remote-control.service runs the app-server daemon the ChatGPT app pairs to. It has to be system-scoped rather than a user unit because this box has no user systemd bus. Pairing survives restarts, so boot reconnects with no manual code.

The first version worked, then failed on restart. Registering with the remote side errors if a start lands within a few seconds of a stop, or before the network is up at boot. Fixed with a 6-attempt retry loop and a post-stop settle delay.

Verified: enabled at boot, cold start, two back-to-back restarts, live control socket, working pairing.

The orchestrator contract went global.

It lived at workspace-4/CLAUDE.md, so only sessions in that one directory obeyed it — while the MCP tools, being user-scoped, loaded everywhere. Agents in the other three workspaces had the delegation tools and no instructions for them. The contract now lives at ~/.claude/CLAUDE.md and applies in every directory. Confirmed by headless sessions run from /tmp citing it.

Permission prompts are off.

defaultMode: bypassPermissions. Unattended runs were the reason: with prompts on, a headless or scheduled run stalls on approval, which quietly defeats the whole “never stop working” premise.

Fan-out is now bounded by RAM.

A PreToolUse hook denies a new subagent when memory is short: 600 MB required per agent above a 2.5 GB floor, hard ceiling of 12 concurrent. It fails open — a broken guard that blocked delegation would cost more than the problem it prevents.

Measured on this box: 19.5 GB total, ~15.4 GB typically available, one subagent costs ~280 MB typical and ~455 MB peak. Fixed services swing by over a gigabyte on their own, which is why a fixed agent count was the wrong control.

Verified that a hook denial is still honoured while permission prompts are bypassed — those are separate layers.

07Two things we got wrong

“The box OOMs above 3 subagents” was never true.

The cap of 3 was written down as settled fact. The kernel disagrees: oom_kill is 0 in /proc/vmstat, and a persistent journal reaching back to 2026-08-08 — across reboots — contains zero OOM records. Subagents were genuinely being killed, and a kill does resume with empty context and read as slowness rather than failure. But it was not the OOM killer, and what actually killed them is still unconfirmed — the RAM-bounded hook replaces a guess with a measured limit either way. Sized against the real numbers, that cap was throttling fan-out to roughly an eighth of capacity, in direct conflict with the throughput goal it was meant to serve.

A missing AGENTS.md was reported as a gap when the file already existed.

The check globbed the workspace directories and ~, and missed ~/.codex/AGENTS.md, which was already present and already carried the tool-batching instruction. The lesson is narrow and dull: a negative result is only as good as the paths searched.

08Not active yet

UI routing is switched off. The design system at claude.ai/design is the source of truth for anything visual, and it is currently empty — list_files returns nothing. Until it has content, UI work is not routed to a worker, because the alternative is a model inventing a visual style and calling it the house style. This page is deliberately plain for exactly that reason.

09Operating notes

  • Do not delegate anything under about 4k tokens. Fixed per-call overhead is ~3.6k, so small delegations are slower and more expensive than doing it inline.
  • Workers run in full isolation with no access to the manager's conversation. All context must be passed explicitly in the prompt.
  • Never read, copy, proxy or re-serve another vendor's OAuth token. Invoke the official binary as a subprocess instead. Every vendor ban wave has been about exactly that line.