In one line: Names and tests harness scaling: a versioned YAML state-machine runbook with checked transitions around a fixed CLI agent, developed on the same 89 Terminal-Bench 2.1 tasks it is scored on, lifts GPT-5.5 from 83.1% (a leaderboard reference, not a rerun) to 92.1% and, frozen, GPT-5.6 Sol to 95.3% raw (never adjudicated; the leaderboard PR closed unmerged after 13 judge flags). After $37 of adaptation DeepSeek-V4-Flash reaches 88.1% (88.8%, level with the reported GPT-5.6 Sol max score, only with one task's extended-timeout trials) on a $15.20 final run, about 1/38 of a different Sol max submission's $574.68. On the only held-out test, BusinessBench, the frozen profiles added 0.55 to 1.34 points.
How far to trust it: Believe the runtime: checked, logged transitions are a sound, reusable way to stop an agent handing off unverified work, and in the released DeepSeek trials a host-run check held back 56% of runs at least once. Treat the Terminal-Bench numbers as a benchmark-tuned upper bound: the runbook was developed on the same 89 tasks it is scored on, the 95.3% is the raw score of a submission the leaderboard closed without merging, and the only held-out test moved 0.55 to 1.34 points. The evidence, judged.
The idea in one sentence: put a CLI agent's plan in a versioned YAML runbook of states whose exits are host-run checks the agent cannot talk its way past (goto refuses until they pass); with a profile grown from failures on Terminal-Bench 2.1, GPT-5.5 goes from 83.1% to 92.1% on those same 89 tasks, while on the one held-out test the frozen profiles added +0.55 to +1.34 points.
You need: what a coding harness's loop, hooks and stop conditions are (Claude Code), and how much the harness alone moves an agentic benchmark score (Agentic benchmarks). New terms: runbook (the YAML state machine: states, permitted transitions, per-state prompts, hooks and checks); profile (a runbook for one class of work, as opposed to the generic runtime); checked goto (a transition that runs exit checks before committing); harness scaling (improving the control layer around a fixed model); hyper-agent (the agent that proposes runbook changes from failure traces); raw against reviewed (a leaderboard score before and after the judge's cheating review).
First covered in the 2026-08-24 tech news issue ("the harness, not the model, was the week's theme"). This page also reads the authors' code, audits their 440 released DeepSeek trials and follows the public review of their leaderboard submission, which changes the reading of the headline number (How much to believe; corrections to the earlier summary). The arXiv HTML failed to convert, so "in the paper" links open the PDF at the right page.
Long-horizon CLI agents often fail although the model can do every step: they drift from the plan, lose track of changing state, skip a known check, repeat what is not working, or stop early and declare the job done (§1). The usual fix is more model. The authors ask the orthogonal question: "How much apparent model failure is actually failure of the harness that maintains state, constrains execution, verifies progress, and recovers from errors?" Improving that control layer is harness scaling, tested three ways: does a better harness lift a fixed model; does it move to a newer model without retuning; do its principles help beyond the benchmark they were built on (§1)?
Two operational hypotheses (not claims about attention) motivate putting control outside the model (§1): control-signal dilution, a short plan and its completion criteria buried under thousands of tokens of commands and output (Figure 6); and mutable-state ambiguity, the current state rebuilt from an append-only history in which loops and branches interleave many versions of the same item (Figure 7).
Existing options sit at the wrong points (§2). Graph runtimes (StateFlow, LangGraph) give explicit state, persistence, routing and recovery, but a developer owns the controller and the agent is split into node calls. CLI agents (Codex, Claude Code) keep autonomy, but their plans, TODO lists, memory files and hooks are advice or fire on tool events, never one authoritative, transition-aware control surface. The paper's Figure 1, rebuilt from its labels, is beside this.
Conceptual placements, "not empirical performance rankings" (Figure 1 caption). Drawn as in the figure (autonomy up, explicit control right); the caption names the axes the other way round. Hover or tap a point for its label.
StateM is a small runtime for CLI agents. Its control layer is a versioned YAML runbook of states, permitted transitions, and per-state prompts, hooks, checks and recovery routes. The agent drives it with ordinary shell commands (where am I, request a transition, why did it fail, history); the user reads, edits and audits the same file. No model change is needed (§1). Two principles: each state is a context-and-contract boundary (entering refreshes the phase's instructions and progress; leaving requires exit checks, because "an agent's declaration of completion does not constitute independent verification"), and agent and user share the control layer. The authors say the novelty is this combination, not any part: graph runtimes already have states and checkpoints, and harness adaptation is not new (§2). The runbook is also the thing to optimise: failures become new runbook versions, so procedural knowledge accumulates outside the weights.
Runtime and profile differ (§3.1): the runtime is generic machinery; the profile is a runbook for one class of work. The Terminal-Bench results measure the runtime plus an evolved, benchmark-adapted profile and "should not be interpreted as isolating the effect of the state-machine abstraction alone".
A runbook is a directed state machine B = (S, s0, ST, E, Φ): phase-level states, an initial state, terminal states ST ⊆ S, permitted transitions E ⊆ S × S, and per state Φ(s) its prompt, hooks, checks and files (§3.3). Inside a state the agent works freely. Entering runs an in_hook (load instructions and a compact progress record); leaving requires the before_transfer checks; an out_hook persists progress and receipts (§3.2). Edges can carry guards that route to repair, handoff or wait, so repair is in the graph rather than in the agent's memory. Appendix A has a complete coding runbook (start, plan, execute, review, handoff, with a session-refresh loop).
Checks differ in what they prove (§3.2): a host-run command or predicate is reproducible evidence, a manual check an explicit decision, an llm_review a separate judgment, and a checklist or message only self-attestation (the ladder beside this).
Bar lengths only order the strengths the paper describes; ranking manual above llm_review is this page's reading.
Every phase change is goto TARGET with an ordered protocol (§3.3): (1) the edge must exist; (2) exit checks run; (3) the out_hook runs; (4) edge guards and hooks run; (5) only then is the target committed and logged; (6) the target's in_hook runs. A failed check leaves the run where it was, with the failure recorded, to repair and retry. "Checked, logged, and recoverable", not transactional: hooks' side effects cannot be rolled back and hook code is not sandboxed (§3.3 footnote).
The released code evaluates the edge condition before the out_hook (README).
The protocol on the paper's worked example, configure-git-webserver (clone, commit and push hello.html, then curl http://server:8080/hello.html must print "hello world"). The baseline "can configure Git, SSH, hooks, and an HTTP server, yet scores 0/5"; StateM gates handoff on a fresh clone, commit, push and curl (§4.6). The same run, without and with the gate, is on the stage; switch the harness to compare:
Illustrative: built only from the paper's description (§4.6) and the gate of the released git_webserver_deploy runbook; no baseline trace is published, so the service that fails is this page's example, and the context stack's proportions are illustrative too. Real runs are on the replay tab.
Per-run state lives outside the runbook (§3.4): current state, history, check outcomes, evidence links. One profile serves many runs, and after a restart or compaction the agent asks StateM where it is instead of rereading a transcript. It cannot recover unsaved work or undo external actions; a paused run is never counted as success. The agent may add stricter dynamic checks for the current entry; weakening user-owned checks needs a privileged decision, and YAML editability is not a security boundary (§3.5). Stop hooks for Codex and Claude Code (the hook mechanism on Claude Code) refuse to stop a run that is neither terminal nor blocked, handing back its open obligations; that cuts premature stops but guarantees neither success nor termination. StateM gives control points, not a correctness oracle (§3.6).
Failure-driven optimisation (§4.6 and §4.7) sorts failures into three gaps: epistemic (knowledge not active at the decision point; fix with state-local context in an in_hook), procedural compliance (the right procedure not completed; fix with checks, guards and evidence requirements) and procedural memory (a past lesson not reactivated; fix with a versioned prompt, check or activation rule). A hyper-agent proposes runbook changes from failure traces; humans set the architecture and three golden rules: prefer minimal reusable control, route from visible task semantics rather than task identity, keep development feedback apart from frozen evaluation (§4.1). Hidden tests, verifier code, solutions, task hashes and task identifiers are off limits. On Terminal-Bench, GPT-5.5 in Codex wrote most of the harness (§4.7).
Four regimes ask "what transfers as model and task distance increase?": fixed-model lift, frozen transfer within a family, adapted transfer across providers, held-out task generalisation (§4). Terminal-Bench 2.1 has 89 tasks × 5 trials = 445; the metric is trial success, plus five-trial coverage (tasks solved at least once), which "measures empirical coverage over five observed trials rather than single-run reliability". Agents are Codex-based with GPT-5.5 xhigh, GPT-5.6 Sol xhigh, GPT-5.6 Luna and DeepSeek-V4-Flash; reference rows reproduce a published result, our run rows are the authors' (§4.1). The profile was developed with GPT-5.5 and frozen for GPT-5.6: no prompt, state, routing, check, default or repair policy revised from target-model outcomes.
For DeepSeek, final-run and adaptation API charges are reported separately; the $1,062.95 on the GPT-5.6 submission is the pipeline's API-equivalent estimate, not what the authors paid on a Codex Pro plan (§4.1).
With GPT-5.5 xhigh fixed, StateM scores 92.1% against the 83.1% Codex reference (+9.0) and solves 88 of 89 tasks at least once (98.9%), numerically above the 91.9% reported for GPT-5.6 Sol Ultra (§4.2). The reference is the leaderboard entry (83.15%, Codex 0.125.0, $2,059.19), "a model-matched public reference rather than a newly rerun, agent-version-matched A/B control" (§4.2 footnote). The frozen runbook on GPT-5.6 Sol xhigh scores 424/445 = 95.28% raw against the 84.9% reference (+10.38), with every task solved at least once. Under the reference harness GPT-5.5 to GPT-5.6 Sol moves only 1.8 points, so the harness gain is five times the generation gain (§4.2).
Status of the 95.28% (footnote 1, as of 11 August 2026): raw, pre-adjudication accuracy from PR #142, which passed ten automated checks and was still open. The authors accept that four flagged rewarded trials should not count (420/445 = 94.38%); zeroing all nine reward-hacking flags gives 415/445 = 93.26%. The pipeline reports 1.178 billion tokens, $1,062.95, six agent timeouts and a 0.87-point standard error (§4.1).
What happened next (beyond the paper; PR #142 thread): the leaderboard's judge flagged 13 of the 424 rewarded trajectories, four of them as harness cheating, a reviewer showed the profile's gate slots map onto single benchmark tasks, and the PR was closed unmerged; zeroing all 13 flags would give 411/445 = 92.36%, which the paper does not print. The thread, step by step, is in the dated block Since the paper.
Within the GPT family the exact runbook transfers: frozen, it lifts GPT-5.6 Luna from 76.7% to 85.4% (+8.7), above the 84.9% Sol xhigh reference on a cheaper tier; "frozen transfer" means zero runbook changes, not zero evaluation cost (§4.3). Across providers it does not: the frozen profile moves DeepSeek-V4-Flash from 82.7% to 82.0%, because StateM leaves the agent enough autonomy for provider behaviour to matter. What carries across is the runtime, the runbook structure, the routing strategy, the failure-analysis loop and the golden rules (§4.3). Hence a hierarchy: exact runbooks across nearby models, principles across providers, control-boundary abstractions across tasks (§4.8).
Adapting the practices to DeepSeek cost $37.02. The adapted system scores 88.09% on all 89 tasks at standard timeouts (392/445, +5.39), 89.09% on the 88-task common core without gpt2-codegolf (392/440), and a descriptive 88.76% with that one task's extended-timeout trials added ((392 + 3)/445; 0/5 standard, 3/5 extended), which rounds to the 88.8% reported for GPT-5.6 Sol max (§4.4). The final run cost $15.20, the whole campaign $52.22; the public Sol max + Codex submission recorded $574.68, so 2.65% (1/37.8) and about 1/11. The paper notes the 88.8% and the $574.68 come from different evaluations (that submission: 83.37% raw, 76.18% after review), so it plots $574.68 at 83.37% (§4.4 footnote). The rebuilt Figure 5 beside this shows it both ways: as the paper plots it, and with each submission's score after the leaderboard's review.
The lesson the authors draw: exact controls did not cross the provider boundary, but the reusable structure made adaptation cheap, so "buy the strongest model" now competes with investing in a harness (§4.4). The released trials confirm every DeepSeek number this page could check, and show why it is cheap: of the input tokens were cache hits (audit on the replay tab).
BusinessBench (from Better Harnesses, Smaller Models), Codex + GPT-5.6 Luna: 477 instances in seven families. The authors abstain on attendance-payroll, leaving 405 instances in six families (810 executions). Luna agents run development instances and propose changes, a GPT-5.6 Sol hyper-agent keeps the ones that generalise, and each family profile is frozen before one held-out run, one trajectory per instance and arm (§4.5).
Table 1; grey Codex CLI, blue StateM-Codex. The 10.04 row is an exploratory two-family subgroup named after the results; family rows are Round-1 aggregates over development and held-out together.
Held-out: macro 84.67 → 85.22 (+0.55), micro 84.44 → 85.78 (+1.34); development 86.07 → 91.71 (+5.64); all treated 84.76 → 88.72 (+3.96). Gains concentrate where the profile matches an execution boundary: Budget Approval +12.21 (exact-decimal arithmetic, policy reconciliation, every mandatory effect closed) and Machine Operating +9.21 (query planning, interval coverage, durable publication); on held-out instances these two go 71.91 → 81.94 (Table 1). RefactorBench (−2.78) and WooCommerce (−3.70) got worse because control sat at the wrong boundary (minimality instead of migration obligations; procedure instead of cross-system invariants); corrected profiles recover in post-evaluation reruns, details on the tables tab. Their summary: "harness generalization follows mechanism match, not task diversity" (§4.5). Table 5 lists the eleven distilled controls.
WebArena (+4.00 on 25 instances, three non-tied outcomes) is retrieval-dominated, WebTest saturated, and abstaining on Attendance was the right call (§4.5).
Table 3 lists twelve GPT-5.5 tasks with the biggest gains and the control active in each (configure-git-webserver 0/5 → 5/5, dna-insert 0/5 → 5/5, dna-assembly 1/5 → 5/5, filter-js-from-html 0/5 → 4/5, ...). They cluster at consequential boundaries: service readiness before handoff, contract satisfaction before a commit, preservation before destructive steps, evidence before completion; the paper says the association "is not a component ablation" (§4.6). These twelve carry extra trials, of the 9.0 (tables tab).
Procedural memory must be selective (§4.7). A practice is any reusable, experience-derived intervention (an instruction, a check, an activation condition); the loop is execute, observe, attribute, abstract, encode, validate. On Terminal-Bench one profile covers 89 heterogeneous tasks, and fixing tasks one at a time caused "control drift", so it stays thin and activates late, state-local checks only when visible evidence says they apply (§4.7). "More remembered procedure is not better memory." The authors disclose what the harness should not have remembered: precision defaults for video tasks set "after observing benchmark behavior"; DNA insertion's left-most-boundary convention, learned from verifier feedback "without ever reading verifier code", so its meaning comes from the evaluator, not the task; and valid failures abstracted wrongly (the first BusinessBench profiles). Their rule: "experience must be filtered before it becomes memory".
A 22-hour run (§4.8): one profile-development session ran 22 hours through compaction and stop-hook continuations, StateM's record supplying phase, history and obligations throughout; the slowdown came from unfolded terminal output, not lost state. Discussion (§5 and §6): harness scaling needs a runtime cheap to change yet enforceable; multi-agent, role-isolated runtimes are future work. The conclusion: "model scaling expands what an agent can do; harness scaling helps the system remember what experience has taught it to do without training, and ensures that it actually does so before proceeding."
What holds up.
What is not like for like, or not tested.
configure-git-webserver as its "canonical positive contract". Routing reads visible semantics, not names, but a catalog grown from these tasks' failures will fit them; that is what the leaderboard review was about.statem start / cur / next / goto / history. Ships the Appendix A coding runbook, Codex and Claude Code plugins with optional stop hooks, one executable Terminal-Bench family, and the DeepSeek release. Not released: the GPT profile behind 92.1% and 95.3%, and the BusinessBench profiles.command or predicate gate there; checklists are attestation, not proof.git_webserver_hints and sqlite_wal_hints that map onto single benchmark tasks. The author answered that the slots are empty generic configuration, agreed they were "unnecessary and confusing", disclosed benchmark-tuned video tolerances, and asked where the line for evolving harnesses should be. On 19 September 2026 the PR was closed unmerged: "Community submissions are currently closed for Terminal-Bench 2.1".These are real runs: the authors' released DeepSeek-V4-Flash trials on Terminal-Bench 2.1, 88 tasks × 5 trials, each with its full StateM history (every requested transition, every check the host ran, its output, and the time). The runbook is the one the trials used, terminal-bench-statem-codex-thin-review: solve directly, check the visible task contract, one bounded self-review, then either a light soft guard or a focused guard with a task-family gate, then handoff. The stage lays its eight states on the floor and replays the run you pick, one recorded event a step: a committed goto carries the agent along a green edge, and a refused one leaves a red plate on the edge, with the check that refused it in the step's text.
The run's start and its first in_hook are one step. Check outputs are trimmed to about 260 characters; checklist results the runbook marks as needing no confirmation are hidden. Times are seconds since the run started. Data: src/audit_artifact.py on the artifact (job ); runs are picked by a stated rule, not by eye.
This page's audit of the artifact (checksums verified) against §4.4: of 440 trials pass (the paper's 392/440); of 88 tasks are solved at least once (only never are); the recorded API cost of the 440 trials sums to , leaving of the paper's $15.20 for the unreleased gpt2-codegolf runs; of the 2.13 billion input tokens were cache hits, which is why the run is cheap. Not in the paper: the job allowed up to two automatic retries of any trial whose exception was not one of four verifier errors (agent timeouts are not among the four) and recorded retries; every trial ran with reasoning effort "max" and a 750-second StateM deadline; and none of the 89 task names appears anywhere in the 54-file harness source.
Each row is a task; each square one of its five trials, green when the verifier passed it, grey when not; a red outline marks a trial in which a host-run check refused at least one transition. Tap a task to see its trials' cost, time and route.
Every table that carries the argument, transcribed from the paper's LaTeX source with its printed precision, plus the public leaderboard submissions the paper compares against (fetched from GitHub by src/fetch_leaderboard.py). Every derived number is recomputed by src/recompute.py; the last card lists the checks.
Table 4. Reference rows reproduce a published result; StateM rows are the authors' runs. Sort by any column; "gain" is the StateM row minus the reference for the same model.
From the terminal-bench-2-1 repository. "After review" is the accuracy once the maintainers zeroed the trajectories their judge flagged and they upheld; cost is the pipeline's reported model cost. StateM's submission was never reviewed to the end, so its row shows the range the paper and the judge's flags imply.
The chart beside this shows each submission raw or after review; the table under it gives every number with its PR, standard error and cost. Review took 7.19 points off the GPT-5.6 Sol max comparator (83.37 to 76.18) and about as much off the first Terra and Luna max submissions (7.19 and 7.41), against 0.22 off the GPT-5.5 reference.
Table 3: successful trials out of five, Codex CLI against StateM-Codex, with GPT-5.5. Added here: the same task in the released DeepSeek + StateM run, whether a DeepSeek trial selected a task-family gate on it, and whether the leaderboard's judge flagged it as harness cheating on the GPT-5.6 submission.
Table 1 (frozen one-shot) and Table 2 (post-evaluation diagnostics, which used aggregate evaluation feedback). Codex CLI against StateM-Codex, GPT-5.6 Luna.
Why two families got worse (§4.5). RefactorBench (80.56 → 77.78): the first profile stressed minimality and backward compatibility but did not close explicit migration obligations; a thinner profile (track visible obligations, verify required signature and call-shape changes, one repository-wide stale-reference sweep) lifts a matched post-evaluation rerun 76.39 → 79.17 overall and 75.00 → 80.56 on development, held-out unchanged at 77.78. WooCommerce Stock (92.59 → 88.89): plenty of procedure, but not the cross-system invariants (inventory entities, per-destination deduplication, irreversible email actions, receipts); with them a rerun goes 86.42 → 90.12 overall and 85.37 → 90.24 on the reused held-out split. WebArena (88 → 92) is retrieval-dominated: three non-tied outcomes in 25 instances (development 2 wins, 10 ties, 0 losses; held-out 0 wins, 12 ties, 1 loss); a lighter query-state profile is untested "due to model capacity constraint". WebTest is saturated: later reruns reach 100.0 (development) and 99.5 (held-out) for both arms, 99.75 overall. Attendance: all 72 treatment runs got no StateM; abstaining was the right decision. A strong profile "binds the minimum invariants likely to drift and verifies them where a violation becomes consequential" (§4.5).
Table 5. Each control targets a reusable failure mode, configured only from the visible task, the workspace, public documentation and observable tool results. Hard gates are kept for evidence-bearing invariants (mandatory effects, edit boundaries, batch closure); preferences that can conflict with legitimate designs stay soft. Tap a row to read it.
Standard errors on the reading tab: z = (p1 − p2) / √(SE1² + SE2²), with SE = √(p(1 − p)/445) where no published SE exists, and the leaderboard's 0.87 (StateM submission) and 1.13 (GPT-5.5 reference after review) where one does. The BusinessBench bound uses √(2 · 0.85 · 0.15 / 405). For the DeepSeek run, the task-clustered standard error (spread of the 88 per-task pass rates) is against a binomial : generalising to new tasks of this kind is much less certain than rerunning these ones.
Every link opens in a new tab. Reading time of the resources below: 2h 00m.
Preprint, the paper itself, 26 pages; this page links into it by PDF page because the arXiv HTML conversion failed after the title. abstract page; source with the LaTeX and vector figures.
(45 min)
The runtime (Python 3.11+, no dependencies), the coding-agent runbook of Appendix A, a Codex and a Claude Code stop hook, one executable Terminal-Bench task family (git_webserver_deploy) and, in a release dated 18 August, the DeepSeek-V4-Flash run: its exact 54-file harness source and 440 redacted trials with every StateM state, check and receipt. This page's replay tab is built from those trials. The GPT-5.5 and GPT-5.6 profile behind the 92.1% and 95.3% is not released.
(20 min)
the authors, GitHub: the runtime, the minimal runbook, the six-step transition, the CLI table and the stop-hook setup; the quickest way to see what a runbook looks like.
(15 min)
harbor-framework/terminal-bench-2-1, July to September 2026: the 95.28% submission: the automated checks, the judge's 13 flags, the authors' replies, a reviewer's report of task-shaped gate slots in every trajectory, and the closing note (community submissions closed, not merged).
(15 min)
the authors, GitHub release, 18 August 2026: what is released for the cost-frontier run (source, reproduction kit, 440 redacted trials with checksums) and what is not (the gpt2-codegolf extended-timeout trials).
(10 min)
the authors, GitHub: one executable Terminal-Bench family runbook with its fixed end-to-end gate: the clearest view of what a focused gate is.
(10 min)
Hugging Face Daily Papers, #1 on 18 August 2026: the community discussion and links.
(5 min)
the benchmark for exactly what StateM's hyper-agent does by hand: build a harness, then evolve it from feedback. Its main warning (the score a creator can see moved with the held-out score in only 34 of 64 changes) is the risk StateM's Terminal-Bench numbers carry, and it names StateM among the harness-scaling results it was written to test.
turns agent trajectories into 37,300 terminal environments and fine-tunes Qwen3.5-27B on them for +11.9 on Terminal-Bench 2.1: the model-side route to the benchmark StateM attacks from the harness side.
skills-as-files: procedural knowledge an agent may or may not follow. StateM's answer is to make the procedure an enforced transition instead of advice.
the reason-act-observe loop that CLI agents such as Codex still run inside each StateM state.
the same August 2026 harness-over-model wave, on the environment side.
harness evolution at run time rather than between versions.
another self-improving harness from the same month.
automated loops that improve a harness, the step StateM leaves to a hyper-agent plus human golden rules.
regularising self-improving harnesses, the problem StateM's "experience must be filtered before it becomes memory" points at.
control-signal dilution attacked by reminders rather than by states.
the issue that first covered StateM, beside Nvidia's ARC-AGI-3 harness result, under "the harness, not the model, was the week's theme".
Codex, Claude Code and their control fragments (plans, TODO lists, memory files, hooks), which StateM organises into one runbook.
StateFlow and LangGraph, the graph runtimes StateM contrasts itself with.
Terminal-Bench 2.1 and BusinessBench, and the submission and adjudication mechanics this paper is a case study in.
This page is one row of the Papers database; its properties (Paper, Takeaway, Topics, Year) live there.