GitHub - Kuberwastaken/subagentmaxxing: Drive OpenAI Codex & Cursor CLI coding agents as subagents with the same ergonomics as native Claude Code subagents (grok-4.5, composer-2.5, gpt-5.5). Uniform run/fanout CLI + Claude Code skill.

GitHub

12 min read Original article ↗

subagentmaxxing

Drive OpenAI Codex and Cursor coding agents as subagents — with the same ergonomics as a native Claude Code subagent.

skills.sh

One prompt in, one clean answer out. Pick the model (grok-4.5, composer-2.5, gpt-5.5, or Cursor-hosted Opus/Sonnet/Gemini), the working directory, and the sandbox level. Get structured JSON if you want it. Fan one prompt out across many models in parallel for consensus or a second opinion.

The whole thing is a single dependency-free Python CLI, subagent, plus a Claude Code skill that teaches an orchestrating agent when and how to use it.

flowchart LR
    O["Claude / Fable<br/>orchestrator"] --> S["subagent<br/>run · fanout · jobs · models · doctor"]
    S --> C["codex exec<br/>gpt-5.5 · gpt-5.6 sol"]
    S --> U["cursor -p<br/>grok-4.5 · composer-2.5"]
    S --> L["claude -p<br/>opus · sonnet"]
Loading

Why

Claude Code gives you great native subagents (the Agent tool). But sometimes you want a different brain on the problem — Grok's take, Composer's speed, GPT-5.5's reasoning — or you want several models to vote. Those live behind the Codex CLI and the Cursor CLI, each with its own flags, output format, auth model, and quirks.

subagentmaxxing normalizes all of that into one interface so an orchestrating agent can treat a Codex or Cursor run exactly like a Claude subagent.

And it's far cheaper. On Artificial Analysis's Coding Agent Index, Cursor's Composer 2.5 scores 62 at $0.07/task vs Opus 4.7-max's 66 at $4.10/task — ~94% of the quality for ~1.7% of the cost. Let Claude orchestrate and cheap non-Claude models execute, and a feature runs ~15–30× cheaper at near-flagship quality. Full breakdown, sourced: Model economics below.

Quick start

On any machine — your laptop, a server, or a container — where codex, cursor-agent, and/or claude are installed and authenticated:

git clone https://github.com/Kuberwastaken/subagentmaxxing.git && cd subagentmaxxing
bash install.sh          # puts `subagent` + `subagent-remote` on ~/.local/bin and installs the skill
subagent doctor          # verify each backend is installed + authed

Run a subagent:

subagent run cursor -m grok  --sandbox read "Explain what this repo does"
subagent run codex           --sandbox read "Find the auth bug in server.py"
subagent run cursor -m composer --sandbox write "Add type hints to utils.py"

Fan out for consensus:

subagent fanout "Is this migration reversible? yes/no + one line why" \
  --on cursor:grok --on cursor:composer --on codex --on claude:sonnet --sandbox read

Prefer to keep the agents (and their auth) on a beefier/remote host and drive them from your laptop? Install subagent on that host, point SUBAGENT_HOST at it, and subagent-remote forwards over ssh (quoting-safe, stdin piped through):

export SUBAGENT_HOST=my-agent-box   # any ssh host/alias where subagent is installed
subagent-remote run cursor -m grok --sandbox read "review this diff" -C /path/on/host
echo "$PROMPT" | subagent-remote run codex --sandbox read -      # prompt via stdin

Commands

command description
subagent run <backend> [opts] "prompt" run one subagent; prints its final answer
subagent fanout "prompt" --on b:model … same prompt across many targets, in parallel; prints a JSON array
subagent run … --backgroundjobs/wait/logs detached execution + polling
subagent models [backend] list available models + aliases
subagent doctor check installs + auth for every backend

Backends: claude, codex, cursor. See docs/backends.md for every flag each backend exposes, and docs/feature-matrix.md for how close each comes to a native Claude subagent.

Key options

  • -m/--model — id or alias (grok, composer, gpt, opus, sonnet, …)
  • -e/--effort minimal|low|medium|high|xhigh — reasoning effort
  • -C/--cwd — working directory
  • --sandbox read|write|all — analysis / autonomous edits / no sandbox
  • --system TEXT — system prompt / role instructions
  • --schema FILE — structured JSON output (codex native)
  • --worktree NAME — run in an isolated git worktree (edits don't touch your tree)
  • --background — detached; poll with subagent wait <id> / jobs / logs
  • --json — full envelope (session_id, usage, duration, worktree, the exact command)
  • --resume ID — continue a prior session (multi-turn)

Full parity table (what maps to what on each backend): docs/feature-matrix.md.

Model economics

Why a Claude orchestration layer over non-Claude executors wins. Snapshot: 2026-07-09 — one of the fastest-moving corners of the industry (Grok 4.5 shipped 2026-07-08, GPT-5.6 "sol" went GA 2026-07-09, Sonnet 5 on 2026-06-30). Numbers are sourced (see the end) but will drift; re-check before quoting.

TL;DR

Agentic coding is really two jobs: orchestration (decompose a goal, route subtasks, sequence them, verify results, hold coherence over a long run) and execution (write this function, run these tests, patch this file). They have opposite cost profiles:

  • Orchestration is a small share of the tokens but needs the best judgment.
  • Execution is 80–90% of the tokens and mostly needs competent, fast, cheap labor.

Claude (Fable 5 / Opus 4.8 / Sonnet 5) is the strongest orchestrator. But paying flagship per-token prices for the huge execution volume is waste, because non-Claude executors — Cursor Composer 2.5 and xAI Grok 4.5 especially — now deliver ~90–98% of frontier coding quality at 10–60× lower cost. So the efficient architecture is a thin Claude orchestration layer driving a fleet of cheap non-Claude executor subagents — which is exactly what subagentmaxxing makes one command.

The punchline number: on Artificial Analysis's Coding Agent Index, Composer 2.5 scores 62 at $0.07/task vs Opus 4.7-max at 66 for $4.10/task — that's 94% of the intelligence for 1.7% of the cost. Put Claude in charge of deciding and checking, and let Composer/Grok do the typing.

The models at a glance (as of 2026-07-09)

Model Role it's best at Input $/M Output $/M Context Intelligence Index¹ SWE-bench Pro Terminal-Bench 2.1
Claude Fable 5 orchestrator (top) $10 $50 1M #1 (leads) 80.3%
Claude Opus 4.8 orchestrator / hard coding $5 $25 1M ~61 69.2% 74.6%
Claude Sonnet 5 cheap orchestrator $3 ($2 intro²) $15 ($10 intro²) 1M ~53 63.2% 80.4%
GPT-5.5 agentic executor $5 $30 ~400K ~55 58.6% 82.7%³
GPT-5.6 "sol" agentic executor (CLI) $5 $30 ~1.5M⁴ n/a not published⁵ 88.8% / 91.9%⁶
Grok 4.5 fast/cheap executor $2 $6 500K 54 64.7% 83.3%
Composer 2.5 cheapest executor $0.50 $2.50 ~256K 62 (coding)⁷ 63.2%⁸

¹ Artificial Analysis Intelligence Index (general reasoning, integer scale ~0–70). Opus 4.8 leads; Grok 4.5 =54 (4th, behind Fable 5, GPT-5.5, Opus 4.8); Sonnet 5 =53. Two different snapshot scales circulate (a 0–100 "%" scale and the integer index) — treated as integer here. ² Sonnet 5 intro pricing $2/$10 through 2026-08-31, then $3/$15. ³ GPT-5.5 figure is Terminal-Bench 2.0. GPT-5.5 also cited at 88.7% on SWE-bench Verified (easier bench than Pro). ⁴ GPT-5.6 context is third-party-claimed (~1.5M), unconfirmed by OpenAI. ⁵ OpenAI declined to publish SWE-bench for GPT-5.6; its system card notes the model "gamed its own software evaluation at the highest rate METR has recorded" — read agentic-coding claims with care. ⁶ GPT-5.6: 88.8% single / 91.9% in "ultra mode" with subagents — itself an endorsement of the orchestrator-plus-subagents pattern. Also ~750 tok/s on Cerebras hardware. ⁷ Composer 2.5's 62 is the Coding Agent Index (agentic coding), not the general index — it's a coding specialist (built on Moonshot's Kimi K2.5, ~1T MoE / ~32B active). ⁸ Composer 2.5 at real-world default effort; it matches Opus 4.7 on SWE-bench Multilingual (79.8% vs 80.5%).

Coding quality, plainly: Fable 5 (95% SWE-bench Verified / 80% Pro) is a genuine step above Opus 4.8; below that, Opus 4.8, Grok 4.5, Sonnet 5, Composer 2.5, and GPT-5.5 sit within ~6 points of each other on SWE-bench Pro (69 → 63 → 63 → 59). The executors are not meaningfully worse coders than the flagships — they're ~10× to ~60× cheaper coders.

The number that matters: cost per finished task

From Artificial Analysis's Coding Agent Index (each model run in its native harness on the same agentic tasks):

Model (harness) Coding Index $ / task min / task vs Composer cost
Opus 4.7-max (Claude Code) 66 $4.10 5.8 59×
GPT-5.5-xhigh (Codex) 65 $4.82 6.2 69×
Grok 4.5 (Grok Build) 54 ~cheaper than GPT-5.5⁹
Composer 2.5 (standard) 62 $0.07 9.3
Composer 2.5 (fast) 62 $0.44 6.7

⁹ Artificial Analysis reports Grok 4.5 "on par with GPT-5.5 in Codex, at lower cost"; xAI also reports Grok 4.5 uses ~4.2× fewer output tokens than Opus 4.8 (15,954 vs 67,020 avg/task), so it's cheap and token-efficient. Estimate ~$0.20–0.50/task.

Composer 2.5 gets 94% of Opus's Coding-Index score for 1.7% of the per-task cost. That gap is the entire economic case for this project.

The thesis: Claude orchestrates, cheap models execute

Why not just run Composer/Grok for everything, skip Claude? Because raw executor quality on a vague task is worse than a flagship's — the executors shine on well-scoped, verified subtasks. That scoping and verification is the orchestrator's job, and Claude is best at it:

  1. Decompose the goal into small, independently-checkable subtasks.
  2. Route each to the right executor (cheap Composer for bulk edits; Grok for fast wide sweeps; GPT-5.6 for gnarly CLI/agentic steps; Claude itself for the 1–2 hardest).
  3. Fan out executors in parallel (subagent fanout) and, for high-stakes calls, get cross-model consensus (grok + composer + gpt vote).
  4. Verify every executor's output — adversarially (subagent run … --sandbox read), re-run tests, reconcile disagreements. A cheap model on a scoped + verified subtask ≈ a flagship on a loose one.

You pay flagship prices only for the thin orchestration layer (~10–15% of tokens) and cheap-executor prices for the 85–90% execution volume. Even OpenAI's own GPT-5.6 gets its best score (91.9%) only in "ultra mode with subagents" — the industry is converging on orchestrator-plus-subagents; subagentmaxxing just lets the orchestrator be Claude and the subagents be whoever's cheapest-per-quality that week.

Blended cost, worked out

Workload unit = one "feature": 1 orchestration pass + 5 parallel executor subtasks. Assumptions (stated so you can redo them): orchestration pass ≈ 50K input + 10K output tokens; executor per-task cost from the table above ($/task) where available, else token-estimated. Illustrative, not a benchmark.

Architecture Orchestrator cost 5× executor cost Total / feature vs all-Opus
All-Opus 4.8 (orchestrate + execute) $0.50 5×$4.10 = $20.50 $21.00
All-GPT-5.5 $0.55 5×$4.82 = $24.10 $24.65 1.2× worse
Opus 4.8 → Composer 2.5 $0.50 5×$0.07 = $0.35 $0.85 25× cheaper
Fable 5 → Composer 2.5 $1.00 $0.35 $1.35 16× cheaper
Sonnet 5 → Composer 2.5 $0.30 $0.35 $0.65 32× cheaper
Fable 5 → Grok 4.5 $1.00 ~5×$0.35 = $1.75 $2.75 8× cheaper
Opus 4.8 → GPT-5.6 sol (hard agentic) $0.50 ~5×$4.00 = $20.00 $20.50 ~1× (buy quality, not savings)

Orchestrator token math: Fable $10/$50 → 0.05×10 + 0.01×50 = $1.00; Opus $5/$25 → $0.50; Sonnet $3/$15 → $0.30.

Reading it: swapping the executor from a flagship to Composer collapses cost ~25–32× while the Claude layer keeps quality near-flagship. The orchestrator choice is a smaller lever (Sonnet vs Fable is $0.30 vs $1.00) — use Sonnet 5 for routine routing, Opus 4.8/Fable 5 when the planning itself is hard.

Pairing guide — "Fable/Opus/Sonnet + X"

Orchestrator Executor Best for Feel
Sonnet 5 Composer 2.5 high-volume, cost-sensitive refactors & sweeps cheapest sane combo (~$0.65/feature)
Fable 5 Composer 2.5 quality-first with hard planning, cheap typing best quality-per-dollar
Fable 5 / Opus 4.8 Grok 4.5 fast wide sweeps, token-efficient, big context quickest wall-clock
Opus 4.8 GPT-5.6 sol gnarliest agentic/CLI work, max ceiling buy capability, not savings
Fable 5 mixed fanout (grok+composer+gpt) high-stakes decisions needing consensus most robust; N-model vote

Run any of these today:

# Sonnet plans, Composer executes 5 scoped subtasks in parallel (cheapest):
subagent fanout --spec tasks.json --max-parallel 5   # tasks target cursor:composer

# One hard subtask to Grok, then verify with a read-only Composer pass:
subagent run cursor -m grok    --sandbox write  "implement X per spec" -C /repo
subagent run cursor -m composer --sandbox read  "review the diff for bugs; CLEAN or list" -C /repo

# High-stakes decision → 3-model consensus, you reconcile:
subagent fanout "is this migration reversible? yes/no + why" \
  --on cursor:grok --on cursor:composer --on codex --sandbox read

Caveats

  • Numbers move weekly. Everything here is a 2026-07-09 snapshot; benchmarks saturate and prices get cut. subagent models shows the live model set; re-verify prices at the source.
  • Benchmarks aren't apples-to-apples. SWE-bench Pro ≠ Verified ≠ Multilingual; Terminal-Bench 2.0 ≠ 2.1; vendor-reported ≠ third-party. Treat single-point scores as directional.
  • The blended-cost table is illustrative, built on stated token assumptions — your real ratio of orchestration:execution tokens sets your real savings. The direction (10–30× cheaper by swapping the executor) is robust; the exact multiple is not a promise.
  • Cheap executors need scoping + verification to hit these quality numbers. The savings are real because the Claude orchestration layer does that work — not despite it.

Sources

Auth model

  • Codex — ChatGPT login (codex login), stored in ~/.codex.
  • Claude — normal Claude Code auth in ~/.claude.
  • Cursor — headless boxes can't run the browser login, so the CLI session token is lifted from the Mac's login keychain to the remote host by bin/lift-cursor-token. It lands in ~/.config/subagentmaxxing/cursor-access.jwt (git-ignored) and lasts ~2 months. subagent doctor reports days-to-expiry. Full details in docs/auth.md.

Layout

bin/
  subagent           the CLI (Python, stdlib only)
  subagent-remote    laptop-side shim: forwards to `subagent` on a remote host over ssh
  lift-cursor-token  Mac-side: copy the Cursor token from keychain to a remote host
skills/subagentmaxxing/SKILL.md   the Claude Code skill
docs/                backends · feature-matrix · auth · recipes
assets/              logo (svg + png, + black variant)
examples/            runnable example scripts
tests/               parity.sh (13 live checks) · smoke.sh
install.sh

Status

Validated end-to-end on a headless Linux host (2026-07). tests/parity.sh runs 13 live parity checks and passes 13/13 on both codex and cursor:

== codex ==            prompt->answer · system prompt · resume/continuity ·
                       reasoning effort · worktree isolation · background job · structured output
== cursor -m grok ==   prompt->answer · system prompt · resume/continuity ·
                       reasoning effort · worktree isolation · background job
parity: 13 passed, 0 failed

Models confirmed live via Cursor: grok-4.5-* (Cursor Grok 4.5) and composer-2.5, plus Cursor-hosted Opus/Sonnet/Gemini/GLM/Kimi; Codex on ChatGPT auth (gpt-5.5).

Run it yourself: subagent doctor && bash tests/parity.sh.

MIT licensed.