At 800 files with decoy modules, small coding stacks fail mostly by editing the wrong file and still reporting success, and structural scoping fixes it where moving the rule closer in the prompt fails.

We ran 1,248 audited headless subagent runs across four native coding stacks (Claude Haiku 5.5 in Claude Code, GPT-5.6 Luna and GPT-6 Luna in Codex CLI, and Gemini 3.8 Flash in Antigravity), spanning bounded utilities, a 12-to-800-file repository ladder with decoy twins, five single interventions at 800 files plus a refusal-schema test, and 12 real SWE-bench Pro V2 tasks across 5 repositories.

Pooled pass rates fell from 65/80 (81.3%) at 12 files to 32/80 (40.0%) at 800 files (57/72 = 79.2% to 26/72 = 36.1% excluding n=1 Gemini 3.8 Flash runs). Giving the worker a file path hint, a repo map, or deleting decoy modules restored passes to 65/80–66/80 and drove wrong-file edits from 47/80 down to 0/80. Across the six non-Flash cells, repo_map cut cost per verified pass 2.0× to 17.1× ($0.0703 down to $0.0041 on Haiku 5.5 low against Phase D's 1/12 control draw, or 9.2× against Phase C's 2/12 baseline), while repeating the constraint closer in the prompt failed (46/80 decoy edits).

Per-run summary CSV & disclosure (CC BY 4.0)

Download all 1,248 sanitized run outcomes under CC BY 4.0 (small-coding-models-benchmark-1248-runs.csv). The CSV includes pass flags, decoy/empty flags, completion statuses (including 15 blanks), wall seconds, API list costs at 2026-10-11 rates (leaving 9 blank cost rows: the 7 Flash Phase G timeouts, where $7.8486 was reconstructed separately from step traces, plus the 2 B–D rows missing parent tokens in Phase C5 and D5), and cached tokens; it excludes Phase E trace columns (files_read, thinking_ratio, repeated_identical_calls, live_edited), the 96 Codex bridge runs, and discarded v1 runs. LeanLM designed the synthetic fixtures and runs EcoCoder (not tested here). Across the 1,248 rows, run_class is MODEL_PASS (821), MODEL_FAIL (368), CONTRACT_FAIL (51), or CORRECT_REFUSAL (8): valid contradiction refusals without code edits are classed MODEL_PASS in Phase B pool_impossible (refusals that edited source code or lacked proof are MODEL_FAIL or CONTRACT_FAIL); out-of-schema refusal strings in C4, D5 control, and pool_impossible_open are classed CONTRACT_FAIL; explicit BLOCKED exits in D5 typed_status are classed CORRECT_REFUSAL; and the 7 Flash Phase G timeouts appear as MODEL_FAIL with blank completion status and wall_seconds >= 600.

1. What We Ran: Stacks, Harness Rules, and Eight Amendments

When you delegate work to a coding agent, you invoke a full stack: a model paired with a CLI harness, system prompt, tool loop, sandbox rules, and cache layout. We tested four native parent-plus-subagent stacks as shipped, at each vendor's low and high effort settings (within-stack only; no claim that vendor effort labels match across providers):

In all four phases (B, C, D, and G), parent sessions dispatched a native worker subagent allowed to read, search, and edit workspace files, but blocked from running code, tests, or installers; grading ran externally in Docker containers. Every feasible B–D task and all Phase G tasks used the same IMPLEMENTED-only completion schema ({"status":"IMPLEMENTED","edited_files":[...]}).

Our analysis plan was locked internally on 2026-10-11 before Phase B ran, then updated during the two-day automated headless run window (2026-10-11 to 2026-10-12) through eight dated amendments without altering prior text:

Phase map (six stages): Phase B tests bounded single-module tasks; Phase C tests the 12–800 file ladder, impossible-at-scale C4, and long-session constraint retention C5; Phase D tests five 800-file interventions plus refusal schema D5. Phase E evaluates failure detectors on Phases C+D; Phase F analyzes cost and simulated routing; Phase G tests 12 SWE-bench Pro V2 tasks plus G4 real-code checks.

Dataset totals (1,248 runs): 240 runs in Phase B (12 tasks × 20 runs), 440 in Phase C (320 ladder, 80 impossible C4, and 40 C5 long-session runs), 520 in Phase D (480 feasible at 800 files plus 40 D5), and 48 in Phase G. In Phase C5 (constraint stated only in request 1), stacks hit 28/40 full passes (19/20 at high effort vs 9/20 at low effort, 0/6 on GPT-6 Luna low with 5 contract failures, and only 2/40 dropping the request-1 constraint). Across 1,200 B–D runs, 1,198 have complete token-cost coverage; the 2 missing parent-token rows aren't imputed (one in Phase C5 session_stockroom_steps GPT-5.6 Luna high, one in Phase D5 impossible control Flash low; neither sits in any feasible ladder or $/pass cell).

2. Bounded Tasks: 94% to 100% High-Effort Pass (Phase B)

Compact models pass bounded single-module tasks before decoy modules and repo size trigger localization failures. Phase B's 11 graded tasks (3 trials per non-Flash task, 1 trial for Flash = 220 runs, beside 20 separate runs of no-refusal pool_impossible_open) pair 10 feasible coding utilities with 1 impossible task that scores valid contradiction refusals as passes (pool_impossible).

On the 10 feasible tasks alone, high effort hit 100% across every stack: GPT-5.6 Luna 30/30, Haiku 5.5 30/30, Flash 10/10, and GPT-6 Luna 30/30. Low effort scored Haiku 5.5 30/30 (100%), GPT-5.6 Luna 28/30 (93%), Flash 9/10 (90%), and GPT-6 Luna 22/30 (73%). Including pool_impossible across all 11 graded tasks gives high-effort pass rates of 94% to 100% (GPT-5.6 Luna 33/33, Haiku 5.5 33/33, Flash 11/11, and GPT-6 Luna 31/33 = 94%) and low-effort pass rates of Haiku 5.5 32/33 (97%), GPT-5.6 Luna 30/33 (91%), Flash 10/11 (91%), and GPT-6 Luna 23/33 (70%).

Median API-equivalent cost per run stayed between $0.0033 and $0.0107 across both Luna models and Haiku 5.5, compared with $0.1270 to $0.2560 for Gemini 3.8 Flash inside Antigravity. When everything a subagent needs sits inside short, isolated modules, small stacks already solve the code.

3. The Cliff From 12 to 800 Files (Phase C)

Phase C embedded four multi-module Python task families inside generated codebases scaling across four sizes: 12, 50, 200, and 800 .py files (~8K to ~615K tokens). Decoy modules scaled right alongside file count: at 800 files, each workspace carried 20 decoy modules, including importable legacy/compat twin packages containing an unexecuted copy of the same bug, plus a distant policy module holding the invariant rule.

This setup stresses locality under a deliberate size-and-decoy confound. Deleting those decoy twins at 800 files in Phase D (twins_deleted) restored the pooled pass rate back to the 12-file level (66/80 = 82.5% vs 65/80), showing decoy modules drove most of the collapse even with 774 files still in the repo. Real repositories rarely name decoys compat by accident, yet they routinely contain vendored libraries, deprecated v1 adapters alongside v2 handlers, stale codegen artifacts, and dead feature branches that grep matches first.

Pooled Passes vs. Wrong-File Decoy Edits (12 to 800 Files) Out of 80 feasible runs per rung (4 stacks) · Ex-Flash n=72 passes: 57, 62, 50, 26 Passed grader (of 80) Edited a decoy module (of 80) 0 20 40 60 80 65 4 12 files (S) 81.3% pass 70 15 50 files (M) 87.5% pass 58 29 200 files (L) 72.5% pass 32 44 800 files (XL) 40.0% pass
Phase C repo-size ladder (320 feasible runs across 4 task families). Including Gemini 3.8 Flash (n=1/cell): 65/80 (81.3%) → 70/80 (87.5%) → 58/80 (72.5%) → 32/80 (40.0%). Excluding Gemini 3.8 Flash (n=72/rung): 57/72 (79.2%) → 62/72 (86.1%) → 50/72 (69.4%) → 26/72 (36.1%), while decoy edits rise from 4/72 to 42/72.

Pass rate holds steady through 50 files, dips at 200 files, and halves at 800 files as decoy modules absorb the subagent's first grep hit (pooled decoy edits climbed 4 → 15 → 29 → 44 out of 80 runs). One harder task family (dependency_plan) accounts for a disproportionate share of pooled baseline failures: 10 of 15 failures at 12 files (0 decoy edits there) and 41 of 95 feasible Phase C failures overall (102 of 246 across C+D), yet every family falls from 12 to 800 files (n=20/rung each):

Raising effort helped substantially across the non-Flash 800-file cells (22/36 = 61.1% at high vs 4/36 = 11.1% at low), yet high decoy-edit rates persisted wherever a stack failed (pooled decoy edits at 800 files: 28/36 low vs 14/36 high ex-Flash):

4. Failures That Report Success (and the Impossible-Task Control)

In Phase C's feasible runs, all 95 failures returned status: IMPLEMENTED (15/80 → 10/80 → 22/80 → 48/80 across 320 ladder runs: 93 MODEL_FAIL and 2 CONTRACT_FAIL). Because those feasible tasks blocked test execution and offered only {"status":"IMPLEMENTED","edited_files":[...]}, failing runs had no failure enum to return.

Two empty-diff and impossible-task patterns stand out across the synthetic suites:

  1. Zero-edit completion claims under the IMPLEMENTED-only schema (Phases C & D): GPT-6 Luna low claimed IMPLEMENTED with zero files changed (empty_diff) on 5 of 12 800-file runs in Phase C. Across all four stacks pooled, zero-diff IMPLEMENTED runs totaled 13 of 320 Phase C ladder runs and 30 of 800 feasible Phase C+D runs (17 in Phase E's fit families plus 13 in Table 2's held-out families).
  2. Contradictory specs with and without refusal enums (Phases B, C4, and D5):
    • Phase B (20 + 20 impossible runs): When BLOCKED_CONTRADICTION was in the schema (pool_impossible), Haiku 5.5 refused 6/6 (5/6 MODEL_PASS; 1 low run edited pool.py as MODEL_FAIL) and Flash passed 2/2. GPT-5.6 Luna refused 5/6 (5/6 MODEL_PASS; 1 low run edited pool.py returning IMPLEMENTED with an invalid-output grade, classed CONTRACT_FAIL), and GPT-6 Luna refused 4/6 (2/6 MODEL_PASS: 1 high and 1 low; 2 high runs returned BLOCKED_CONTRADICTION with rejected contradiction proof as CONTRACT_FAIL; 2 low runs edited pool.py returning IMPLEMENTED and failing tests as MODEL_FAIL). When Phase B dropped the refusal field (pool_impossible_open, IMPLEMENTED-only), Haiku returned IMPLEMENTED 6/6 (MODEL_FAIL) alongside GPT-5.6 Luna (6/6 MODEL_FAIL), Flash (2/2 MODEL_FAIL), and GPT-6 Luna (5/6 MODEL_FAIL, plus 1 unedited BLOCKED classed CONTRACT_FAIL).
    • Phase C4 (80 impossible runs across 12–800 files, IMPLEMENTED-only): Asking for a 33/33/33 split against a zero-cent-loss policy, Haiku shipped 0/24 rule-breaking 33/33/33 patches: 19/24 exited with out-of-schema statuses or blank output and empty diffs (CONTRACT_FAIL), while 5/24 returned IMPLEMENTED (2 empty diffs plus 3 live edits without 33/33/33, MODEL_FAIL). By contrast, GPT-5.6 Luna (24/24), GPT-6 Luna (24/24), and Flash (8/8) all returned IMPLEMENTED and shipped 33/33/33 code in 18/24 (15 live-only + 3 live-and-decoy; plus 5 decoy-only and 1 empty = 8 CSV decoy and 1 empty flags), 17/24 (9 live-only + 8 live-and-decoy; plus 4 decoy-only and 3 empty = 12 decoy and 3 empty flags), and 7/8 (plus 1 live edit keeping valid rounding) runs.
    • Phase D5 (40 runs at 800 files: 20 control vs. 20 typed-status): In the IMPLEMENTED-only control arm, Haiku returned IMPLEMENTED 3/6 times (3/6 NO_CHANGE or blank; 0/6 broke the rule), GPT-5.6 Luna 6/6 (4/6 broke rule), GPT-6 Luna 5/6 (1/6 broke rule), and Flash 1/2 (1/2 broke rule). Adding BLOCKED and NEEDS_INFO fields in typed_status flipped Haiku to 6/6 BLOCKED (CORRECT_REFUSAL, 0/6 broke rule) and Flash to 2/2 BLOCKED (0/2), while GPT-5.6 Luna (6/6, 3/6 broke rule) and GPT-6 Luna (6/6, 0/6 broke rule) still returned IMPLEMENTED on 12/12 typed runs.

Typed refusal schemas gave Haiku 5.5 and Gemini 3.8 Flash a reliable exit on impossible specs at 800 files; they didn't stop GPT-5.6 Luna or GPT-6 Luna from returning IMPLEMENTED (or stop GPT-5.6 Luna high from shipping 3/3 rule-breaking patches).

5. What Fixes It: Scoping Beats Prompt Proximity, and Beats Re-Dispatch on Cost and Latency

Phase D took the exact 800-file ladder and tested five single interventions paired by workspace (4 task families × 3 seeds 20261012..20261014) against a fresh control arm (520 total runs: 480 feasible + 40 impossible D5).

Run-to-run baseline variance at n=12

On the exact same 12 workspaces at 800 files, Haiku 5.5 high passed 10/12 ($0.1328 total / 10 = $0.0133 per pass) in Phase C but 6/12 ($0.0217/pass, 4 decoy edits) when rerun fresh as the Phase D control. By coincidence, GPT-6 Luna high in the Phase D control also rounded to $0.0133/pass ($0.0665 total / 5 passes). Treat 12-run cells as noisy and look for effects that hold consistently across stacks.

Under our internal analysis plan's claim rule (at least one stack's family-clustered 95% CI excludes zero and at least 3 of 4 stacks share the same positive point-estimate sign), path_hint, repo_map, twins_deleted, and parent_verify cleared the threshold at both efforts. Individually, 3/4 stacks had CIs above zero at low effort and 2/4 did at high effort (where GPT-5.6 Luna high touched zero and Flash control was already 4/4 at n=1/cell), while invariant_near failed (0/4 CIs excluding zero at either effort):

Condition (800 files) Decoy Edits Pooled Pass (all / ex-Flash) Median Wall Haiku 5.5 Low $/Pass GPT-6 Luna High $/Pass
control 47 / 80 31/80 (38.8%) · 23/72 (31.9%) 40 s $0.0703 (1/12) $0.0133 (5/12)
path_hint (oracle) 0 / 80 66/80 (82.5%) · 58/72 (80.6%) 35 s $0.0048 (9/12) $0.0038 (12/12)
repo_map (deployable) 0 / 80 65/80 (81.3%) · 57/72 (79.2%) 30 s $0.0041 (11/12) $0.0041 (11/12)
twins_deleted (774 files) 0 / 80 (by const.) 66/80 (82.5%) · 58/72 (80.6%) 35 s $0.0046 (11/12) $0.0047 (11/12)
invariant_near 46 / 80 36/80 (45.0%) · 29/72 (40.3%) 40 s $0.0229 (3/12) $0.0107 (6/12)
parent_verify 49 / 80 65/80 (81.3%) · 57/72 (79.2%) 75 s $0.0156 (9/12) $0.0127 (10/12)

Table 1: Phase D pooled metrics (n=80 all stacks, n=72 excluding n=1/cell Flash; 480 feasible runs at 800 files, or 774 files in twins_deleted after deleting the 20 decoy modules plus 6 now-empty package __init__.py files = 26 files removed). Median files read fell from 6.0 (control) to 4.0 (path_hint / repo_map) and 3.0 (twins_deleted), vs 10.0 for parent_verify. Mean-basis $/pass divides total API-equivalent cell spend across 12 runs by verified passes (cost coverage = 72/72 for non-Flash cells; repo_map excludes map-build cost).

800-File $/Pass: Control vs. repo_map (All 6 Non-Flash Cells) Mean USD / verified pass in Phase D (n=12 runs/cell, map build excluded) Control (unscoped 800 files) repo_map (deployable structural scope) Haiku 5.5 low $0.0703 (1/12*) $0.0041 (11/12 · 17.1x cheaper*) GPT-5.6 Luna low $0.0540 (3/12) $0.0139 (8/12 · 3.9x cheaper) GPT-6 Luna low $0.0507 (1/12*) $0.0067 (6/12 · 7.6x cheaper*) GPT-5.6 Luna high $0.0338 (7/12) $0.0173 (10/12 · 2.0x cheaper) Haiku 5.5 high $0.0217 (6/12) $0.0072 (11/12 · 3.0x cheaper) GPT-6 Luna high $0.0133 (5/12) $0.0041 (11/12 · 3.2x cheaper) SIMULATED Phase C GPT-6 Luna low (0/12) cascade (median $/pass): To Haiku 5.5 high: $0.0179 | To Gemini 3.8 Flash high: $0.4960
All six non-Flash cells in Phase D compare control vs. fixed deployable repo_map ($0.0041–$0.0173 per pass, ratios from 4-decimal means; Gemini 3.8 Flash at n=1/cell passed 8/8 in both). *Single-pass (1/12) control draws inflate Phase D ratios on Haiku low and GPT-6 Luna low (against Phase C's 2/12 Haiku low baseline at $0.0379, repo_map is 9.2× cheaper).

6. Failure Detectors: Structural Diff Checks vs. Telemetry Heuristics

If small models silently ship wrong edits at scale, which telemetry signals catch failures before grading? In Phase E, we split 800 feasible ladder runs (Phases C + D) by task family into 400 fit runs (inventory_ledger, money_split; 97 failures) and 400 held-out runs (dependency_plan, rate_window; 149 failures). Two structural diff checks achieve 100% precision and 0% false alarms by construction on these synthetic repos because no passing test suite leaves the repo unchanged or skips every live module. We also tested a candidate heuristic rooted in thinking-budget intuition: whether unusually high reasoning/thinking tokens mark a stuck run.

In Phase G4, we tested the two zero-fit binary detectors on all 48 real SWE-bench Pro V2 runs (41 non-timeout runs with 5 failures, plus 7 Flash timeouts), defining outside-target edits against each task's gold-patch file paths (which don't exist in production, where failing-test coverage or an import graph substitutes).

Signal Synthetic Held-Out (n=400, 149 fail) Synthetic False Alarms Real SWE-bench Pro (n=41 non-timeout, 5 fail)
edit_not_on_live_path 100% prec · 52% recall (78/0/71/251) 0% FA (by const.) 0/5 recall · 0% FA
empty_diff_but_IMPLEMENTED 100% prec · 9% recall (13/0/136/251) 0% FA (by const.) 0/5 recall · 0% FA
decoy_file_edited 67% prec · 62% recall (92/46/57/205) 18% FA n/a (synthetic decoy setup)
files_read <= 6 44% prec · 65% recall (97/121/52/130) 48% FA not evaluated (Phase E trace metric not extracted for Phase G)
thinking_ratio > 1.25 44% prec · 34% recall (50/63/99/188) 25% FA not evaluated
repeated_identical_calls >= 1 26% prec · 19% recall (28/81/121/170) 32% FA not evaluated

Table 2: Held-out synthetic detector counts (TP/FP/FN/TN) from Phase E alongside external Phase G4 evaluation (edit_missed_gold_files / empty_diff checking gold-patch paths in place of synthetic live paths on n=41 non-timeout real runs; including the 7 Flash timeouts gives n=48 with 12 total failures, 0 alerts, and 0% FA). In production without a gold patch, the corresponding check would test whether edited files intersect failing-test coverage or its import graph.

What the Phase G4 zeros show: edit_not_on_live_path caught 78 of 149 synthetic failures because those benchmarks engineered wrong-file localization traps. On the 5 real-code non-timeout failures in SWE-bench Pro V2 (1 GPT-5.6 Luna run in openlibrary and 4 GPT-6 Luna runs across openlibrary and ansible), both failing Luna stacks edited the right target files and wrote buggy logic inside them.

Token and loop telemetry heuristics (thinking_ratio > 1.25 and repeated_identical_calls) misfired on 25% to 32% of passing runs, while deterministic path and empty-diff checks (empty_diff_but_IMPLEMENTED, edit_not_on_live_path on synthetic repos, and edit_missed_gold_files on real repos) produced zero false alarms on all 36 real SWE-bench Pro passing runs (Wilson 95% upper bound ~10%; the 251 synthetic passing runs have 0% false alarms by construction). With only n=5 real non-timeout failures, 0/5 leaves an upper 95% confidence bound up to 43% (Wilson) or 52% (exact), so five bugs don't prove real-world recall is zero. Deterministic diff checks work as a low-false-alarm pre-test filter; unit tests still have to catch logic bugs inside the right file.

7. Twelve Real SWE-bench Pro V2 Tasks (Phase G)

To check whether synthetic stack rankings hold up on real repositories, we ran all four stacks at high effort with a fixed 600-second wall-clock cap on 12 SWE-bench Pro V2 tasks across ansible, flipt, vuls, openlibrary, and qutebrowser (48 runs total, 0 contamination flags). Workers used the same read/search/edit-only tool policy (no local test execution) and the same IMPLEMENTED-only completion schema as Phases C and D, with external Docker grading by SWE-bench Pro's own verifier.

Stack (high effort, 600s cap) Pass (95% Wilson CI) Timeouts False-Success Median Wall Median $/Run Mean $/Pass
Claude Haiku 5.5 / Claude Code 12/12 (76%–100%) 0/12 0 98 s $0.0245 $0.0454
GPT-5.6 Luna / Codex 11/12 (65%–99%) 0/12 1 125 s $0.0471 $0.0549
GPT-6 Luna / Codex 8/12 (39%–86%) 0/12 4 78 s $0.0116 $0.0176
Gemini 3.8 Flash / Antigravity 5/12 (19%–68%) 7/12 0 600 s (400 s pass) $0.9578 (5 completed) $2.5397 ($0.9700 ex-timeouts)*

Table 3: Directional real-code spot check (n=12 per stack, Wilson CIs ~±25 pp; exact McNemar Haiku vs GPT-6 Luna p=0.125, Haiku vs Gemini 3.8 Flash p=0.016). False-Success counts MODEL_FAIL runs that returned IMPLEMENTED under the Phase G IMPLEMENTED-only schema. *Gemini 3.8 Flash timed out 7 times with null result-block parent tokens; $0.9700/pass covers the 5 completed runs ($4.8498 unrounded), while $2.5397 adds $7.8486 reconstructed from per-step stdout events and child transcripts across the 7 timeouts ($12.6984 unrounded across all 12 runs).

Among the three Codex and Claude stacks, directional rankings matched Phase C at 800 files. Gemini 3.8 Flash inverted from 4/4 on synthetic 800-file runs (n=1/cell) to last place at 5/12 after hitting the 600-second timeout cap on 7 tasks (3/3 Ansible, 2/2 Flipt, and 2/3 OpenLibrary). Claude Haiku 5.5 solved all 12 tasks at $0.0454 per pass, GPT-5.6 Luna finished right behind at 11/12 ($0.0549 per pass), and GPT-6 Luna remained fastest (78s) and cheapest ($0.0176 per pass) while returning IMPLEMENTED on 4 failed tasks.

8. What It Costs: Parent Share, Cold Prefix, and Cheap-First Routing

Two cost patterns in Phase F (1,198 of 1,200 synthetic runs with complete token logs, totaling $50.96) explain why multi-agent coding budgets surprise teams:

1. Wide phase-level cost spreads, plus heavy parent and cached-prefix shares. Across Phases B through D, phase-level median run costs spanned $0.0033 to $0.0172 for Luna and Haiku versus $0.1270 to $0.4282 for Gemini 3.8 Flash inside Antigravity (a 7.4× minimum to 130× maximum spread across phase medians, rising to $0.4924 median in Flash's 800-file Phase C cell). That Flash premium reflects Antigravity Flash's higher list token rates (7.5× Haiku 5.5 and GPT-6 Luna at $0.75/$3.75 vs $0.10/$0.50; 3.75× input and 3.1× output vs GPT-5.6 Luna's $0.20/$1.20) and larger token volumes, while parent orchestration took a smaller share of Flash's bill. Within Codex and Claude cells, the parent orchestrator consumed 17.6% to 57.7% of total cost (10.2%–40.2% on Gemini 3.8 Flash), while cached input tokens accounted for 15.9% to 23.9% of total dollars (67,802 to 878,350 median cached tokens per run).

Claude Code Only · Cold-Prefix Measurement (2026-09-20)

Parent/subagent prefix overhead comes straight from cold context replay: measuring bare date subagent spawns in a single-machine Claude Code (2.1.278) config before the benchmark CLI (2.1.296) showed zero parent cache reuse on turn 1. Every subagent spawn wrote a cold prefix of about 41,000 tokens on Haiku (33,334 system and tool-schema tokens plus 7,399 memory and agent tokens; about 63,000 total on Sonnet and 57,000 on Opus). Restricting subagent tools via a narrow tools: allowlist and setting omitClaudeMd: true (an agent frontmatter field observed in Claude Code 2.1.278) dropped Haiku's cold prefix 80%, down to 8,041 tokens (6,010 system/tools + 2,031 agent/memory). See our LLM caching guide and AI agent cost patterns.

2. Cheap-first escalation fails when the first worker misses most 800-file tasks. Using Phase F's measured cell medians and pass rates at 800 files, we ran a theoretical SIMULATION (a spreadsheet cascade over measured cells) routing failures from GPT-6 Luna low (0/12 passes at 800 files, $0.0036 median / $0.0040 mean) one step upward. Because every 800-file failure returned IMPLEMENTED, a real runtime cascade would also have to pay for tests or an external verifier between stages; this model assumes free oracle failure detection, and a 0/12 first stage adds stage-1 cost to 100% of stage 2 by arithmetic identity.

Under that best-case detection assumption, escalating to Claude Haiku 5.5 high (10/12 in Phase C, $0.0113 median / $0.0111 mean) lands at $0.0179 median ($0.0181 mean) per verified pass. On matching bases, that's 1.3× costlier than dispatching Haiku 5.5 high directly in Phase C on medians ($0.0136), or 1.4× on means ($0.0133; a separate 6/12 Phase D control rerun averaged $0.0217). It also adds 28 median seconds of wasted latency and costs 4.4× more on means than scoping Haiku 5.5 low upfront with repo_map at $0.0041 mean ($0.0040 median), excluding map generation. Escalating instead to Phase C's nominal 4/4 Flash high cell (n=1/cell, $0.4924 median) reaches $0.4960 median ($0.4978 mean), >120× costlier than upfront repo_map scoping on either basis. See LLM model routing for when verifier cascades pay off after cheap-first scoping.

9. Limitations and What This Doesn't Prove

10. Where LeanLM Fits

Frequently Asked Questions

What is the best cheap model for coding subagents?

On our 12 real SWE-bench Pro V2 tasks across 5 repositories (600s cap, high effort), Claude Haiku 5.5 inside Claude Code passed 12/12 at $0.0245 median per run ($0.0454 per verified pass, 98s median) and GPT-5.6 Luna inside Codex CLI passed 11/12 at $0.0549 per pass. GPT-6 Luna was cheapest per pass ($0.0176) at 8/12, with 4 silent false-successes. With a repo map at 800 synthetic files, cost per verified pass dropped 2.0× to 17.1× across the six non-Flash cells (Haiku 5.5 low fell to $0.0041/pass, a 17.1× drop vs Phase D's 1/12 control draw or 9.2× vs Phase C's 2/12 baseline; GPT-6 Luna high fell 3.2× to $0.0041/pass with repo_map and 3.5× to $0.0038/pass with path_hint), excluding the cost of generating the map.

Why do small coding models fail on 800-file repositories?

Decoy modules scaling alongside file count drove most of the failure cliff. Stacks passed 70% to 97% at low effort and 94% to 100% at high effort on bounded fixtures, then dropped from 65/80 (81.3%) at 12 files to 32/80 (40.0%) at 800 files (26/72 = 36.1% excluding Gemini 3.8 Flash). At 800 files, 44 of 80 Phase C runs edited a legacy or compatibility decoy module, GPT-6 Luna low claimed IMPLEMENTED with zero files modified on 5 of 12 runs, and deleting the decoy twins in Phase D restored 66/80 (82.5%) passes.

Does Claude Haiku 5.5 beat GPT-6 Luna on real coding tasks?

On the 12 SWE-bench Pro V2 tasks at high effort, Claude Haiku 5.5 / Claude Code passed 12/12 (76%–100% Wilson 95% CI) versus GPT-6 Luna / Codex at 8/12 (39%–86% CI), though exact McNemar p=0.125 at n=12 makes this directional (underpowered for statistical proof). GPT-6 Luna finished faster (78s vs 98s) and cheaper ($0.0176 vs $0.0454 per pass), while failing with four silent false-success claims.

How much does a Claude Code subagent cost?

At published API list rates, Haiku 5.5 / Claude Code cost $0.0245 median per run on the 12 SWE-bench Pro V2 tasks ($0.0454 mean per verified pass) and $0.0037 to $0.0090 phase median on synthetic multi-agent tasks, where parent orchestration took 17.6% to 57.7% of total Codex and Claude cost (10.2% to 40.2% on Antigravity Flash). On Claude Code 2.1.278 (single-config measurement on 2026-09-20), a bare subagent spawn wrote about 41,000 cold-prefix tokens with zero parent cache reuse; a tools: allowlist plus omitClaudeMd: true cut that cold prefix 80% to 8,041 tokens.

Can thinking-token ratios detect when a coding agent is stuck?

Not in our held-out test. Across 400 held-out feasible runs in Phase E, thinking_ratio > 1.25 scored 44% precision, 34% recall, and a 25% false-alarm rate, and repeated_identical_calls >= 1 scored 26% precision with 32% false alarms. Deterministic structural checks (empty_diff_but_IMPLEMENTED and edit_not_on_live_path) achieved 100% precision and 0% false alarms on synthetic repos by construction (zero passes edit nothing or skip live code), produced 0/36 false alarms on real passing runs against gold-patch paths (about 10% Wilson 95% upper bound), and caught 0 of 5 real-code logic failures (checked via edit_missed_gold_files against gold-patch paths in Phase G4) where GPT-5.6 Luna and GPT-6 Luna edited the right files but wrote buggy logic.

Why can cheap-first model escalation cost more than running a stronger model?

When the cheap first-try worker fails most runs at scale, even assuming free oracle failure detection between stages, you pay for the wasted first attempt plus the escalation model. Routing first to GPT-6 Luna low at 800 files (0/12 passes, forcing 100% escalation) and escalating to Haiku 5.5 high cost $0.0179 median per pass. That's 1.3× direct Phase C Haiku high on medians ($0.0136) and 1.4× on means ($0.0181 vs $0.0133; Phase D's rerun averaged $0.0217). It also costs 4.4× more on means than scoping Haiku 5.5 low with repo_map at $0.0041 mean ($0.0040 median), while escalating to Flash high hit $0.4960 median ($0.4978 mean).