A coding agent improves the prompt, the tools and the loop around a closed model on your own traffic. The gain is proven on days it never saw, on a second model, at the same cost.
What you learn: how a coding agent runs a harness search on yesterday’s traffic, what it reads, what it writes, and the three checks a change has to pass. Needs: nothing for the dry run. Takes: seconds offline, minutes per candidate with a key.On a closed model the harness is the only thing you can change: the
instructions, the tools, the turn cap, the retry, how context is built.
Among comparable frontier models it explains more of the spread than the
model does [1], and a harness searched with earlier candidates’ code and
traces in view beat the hand-built ones on TerminalBench-2 [2]. The catch:
tuned on the tasks it was scored on, harness evolution gained 0.6 points
held out and lost to more samples of the baseline at the same budget [3].
The loop below is built around what the agent is not allowed to see.Runnable version:
recipes/papers/meta-harness.
Playbook for the coding agent:
skills/harness-search.
The object it searches over: the harness.
Point the recipe at yesterday’s export: a JSONL in any shape load_traces
reads, or an OTLP JSON batch, which rows_from_otel groups into
conversations. One task per distinct ask. Nothing leaves your machine.
cd recipes/papers/meta-harnesspython run.py --traces traces-2026-09-21.jsonl --propose --select --fresh
Rows carry the ask, the steps, the reply and a timestamp. Extra keys pass
through.
from whileai.simulations import load_tracesrows = load_traces( [ { "ts": "2026-09-19T09:00:00Z", "input": "Where is my refund for ORD-5412?", "output": "Certainly! It went through.", }, { "ts": "2026-09-21T09:00:00Z", "input": "Refund ORD-8821, the jacket arrived torn.", "output": "Done.", }, ])print(len(rows), sorted(rows[0]))
The holdout is the latest days, whole days, until it holds half the tasks.
The proposer reads earlier days only. Train asks that are near-copies of a
holdout ask (decontaminate, the 8-gram rule) leave its window too.
out/split.json records it, and the proposal opens by saying which days
decide.
split: holdout is 2026-09-20 and later: 16 of 24 tasks; 1 train prompt(s) overlapped the holdout and left the proposer's window
out/proposal.md: every candidate so far as code, its pass@1 on the train
days with an interval over tasks, and its five worst rows. Nothing is
summarized. The proposer’s edge in [2] was raw traces, not digests.
## 00_baseline.pytrain pass@1 0.71 [0.52..0.85] on 8 tasks; holdout 0.67 [0.50..0.83]; fingerprint 71fed4102190Worst rows:- ask: I want my money back on ORD-5412 right now. reply: Certainly! Your refund went through. why: boilerplate in the reply; claimed success on a tool result that did not succeed
One file, one change, chosen from the worst rows. A candidate defines
harness(model) -> wai.Harness. The fingerprint hashes the instructions,
the tool names and the Disclosure fields, so the edit is a new version
without anyone naming it, and every row says which harness made it.
import whileai as waifrom whileai.harness import DisclosureTOOLS = [ { "type": "function", "function": { "name": "lookup_order", "description": "Look up an order by id.", "parameters": { "type": "object", "properties": {"order_id": {"type": "string"}}, "required": ["order_id"], }, }, }]BASE = "Look the order up before you act."scripted = wai.seeded_agent(TOOLS, rate=0.3, seed=0) # stands in for the model offlinebaseline = wai.Harness( agent=scripted, instructions=BASE, tools=TOOLS, label="baseline", model="scripted")candidate = wai.Harness( agent=scripted, instructions=BASE + " Report what the tool returned; never claim success on an error.", tools=TOOLS, label="report_fault", model="scripted", disclosure=Disclosure(max_turns=4),)print( baseline.version, baseline.fingerprint, candidate.version, candidate.fingerprint, baseline.fingerprint != candidate.fingerprint,)
The pick. The candidate that leads the most train tasks, per task the
best pass rate across candidates with ties shared. Not the best mean: a
mean gained by regressing a subset does not win [4].
Is it real. On the held-out days the pick beats the baseline with a
paired interval that excludes zero, and again on a second model. The
held-out tasks the baseline passed every time and the pick failed every
time are counted beside it.
Did it just spend more. Cost per rollout is on the ledger: tokens when
every row carries usage, model calls otherwise. A pick may cost no more
than the baseline (--cost-margin 0). A candidate that wins by spending
more is a frontier point, and the verdict names the margin that would
accept it [3].
train tasks led: 00_baseline.py 5, 01_no_filler.py 7, 02_check_result.py 12 -> pick 02_check_result.pyholdout on scripted: 02_check_result.py vs 00_baseline.py +0.27 [+0.15, +0.42] over 12 paired tasks, 0 the baseline passed and the pick failed -> clears zeroholdout on scripted-b: 02_check_result.py vs 00_baseline.py +0.50 [+0.38, +0.62] over 12 paired tasks, 0 the baseline passed and the pick failed -> clears zerocost per rollout: 02_check_result.py at 1.00x the baseline in calls -> within the marginselect: 02_check_result.py beats the baseline on the holdout and on a held-out model at 1.00x its cost
wai.harness.attribute over the candidate by model grid says whether the
spread is the harness or the model.
A pick that bundles five edits may owe its gain to two. On legal workspace
tasks, harness evolution with no constraints raised its own split from 89.4
to 92.8 but moved three unseen benchmarks only from 39.7 to 40.3, at 2.4x
the tokens. With constraints on what gets proposed and what gets kept, the
unseen benchmarks reached 43.6 on 36% fewer tokens than the unconstrained
run. One of those constraints deletes components that stopped earning
their place [7].--prune does that to the pick. A candidate lists its changes as named
edits, and the recipe takes each one out in turn and replays the train
days. An edit goes when the score without it is no lower and the cost per
rollout is no higher. The pruned harness then faces the same gate, so the
holdout still decides.
prune one_sentence: train 0.67 without it vs 0.92, 1.00x the cost in calls -> kept: removing it loses score or raises costprune turn_cap: train 0.92 without it vs 0.92, 1.00x the cost in calls -> droppedprune retry: train 0.92 without it vs 0.92, 1.00x the cost in calls -> droppedprune: 2 of 5 edits dropped (turn_cap, retry); the pruned harness clears the gate; copy out/02_check_result_pruned.py into candidates/ to keep it
The output above is the offline dry run, where the scripted agent ignores
the turn cap and the retry, so they always go. On a real model the turn cap
can cut tokens, and then the cost rule keeps it. The agent loops on steps 3 to 5 until
the gate passes or the rounds run out. A search that never clears is a
result too.
Every candidate is posted as a harness version, so the Runs page groups the
dots by harness. Under the pick, five lines from the ledger: Changed, Moved,
Why, Learned, Reproduce. You read one chart and decide.The holdout says what the pick can do on traffic it never saw. The next day
says whether that survived. The skill ends by scoring the day after with
the same judge and posting one LiveDay. A flagged rate near the holdout’s
failure rate closes the loop. One well above it makes that day the new
traces.
Moved: 67 to 73 points on 16 held-out tasks (holdout is 2026-09-20 and later), +6 [+2, +11]; 0 task(s) the baseline passed and it failed; 1.00x the cost per rollout.next day: 21 of 100 flagged; the holdout said 27 of 100
A search stalls when the model lacks something no prompt supplies. On a
legal classification task, harness edits alone reached 50 points and
harness plus weight updates reached 70 [5]. On an open model the same
held-out test and judge carry over to training: evals, then
SFT from traces or GRPO.
Xia, P. et al. RRSI: Regularized Recursive Self-Improvement of Agent Harnesses. 2026. Edit budget, credit from history, exploration, leakage critic, noise floor, cost rule, pruning. Unseen benchmarks 39.7 to 43.6 against 40.3 for unconstrained evolution, at 2.42M vs 3.80M tokens per trial.
Last modified on September 23, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"While","description":"The whileai Python SDK: a scientific post-training library for language models. SFT and RL on open models, with the measurement that says whether training helped.","colors":{"primary":"#3F8F6B","light":"#5CB08A","dark":"#3F8F6B"},"logo":{"light":"https://mintcdn.com/crestoneai/hjeVhItGjBtdvUpc/logo/light.svg?fit=max\u0026auto=format\u0026n=hjeVhItGjBtdvUpc\u0026q=85\u0026s=fd40f337324aa68ac40e059afab7507a","dark":"https://mintcdn.com/crestoneai/hjeVhItGjBtdvUpc/logo/dark.svg?fit=max\u0026auto=format\u0026n=hjeVhItGjBtdvUpc\u0026q=85\u0026s=c7e493f84bec17075fae54a8f35f9a8c","href":"https://while.ai"},"favicon":"https://mintcdn.com/crestoneai/hjeVhItGjBtdvUpc/favicon.png?fit=max\u0026auto=format\u0026n=hjeVhItGjBtdvUpc\u0026q=85\u0026s=5b1a523cfbbafac06e44d37967cf4d8a","appearance":{"default":"light"},"background":{"color":{"light":"#FFFFFF","dark":"#0B1220"}},"navbar":{"links":[{"href":"https://pypi.org/project/whileai/","label":"PyPI"},{"href":"https://github.com/whilehq/whileai-sdk","label":"GitHub"}],"primary":{"type":"button","label":"Platform","href":"https://while.ai"}},"footer":{"socials":{"github":"https://github.com/whilehq/whileai-sdk"},"links":[{"header":"Library","items":[{"label":"Quickstart","href":"https://docs.while.ai/get-started/quickstart"},{"label":"Evals","href":"https://docs.while.ai/evals"},{"label":"The five calls","href":"https://docs.while.ai/reference/five-calls"},{"label":"Recipes","href":"https://github.com/whilehq/whileai-sdk/tree/main/recipes"}]},{"header":"Reference","items":[{"label":"API","href":"https://docs.while.ai/api/index"},{"label":"Parameters","href":"https://docs.while.ai/reference/parameters"},{"label":"Style","href":"https://docs.while.ai/reference/style"},{"label":"Design","href":"https://docs.while.ai/reference/design"}]},{"header":"Project","items":[{"label":"Constitution","href":"https://github.com/whilehq/whileai-sdk/blob/main/CONSTITUTION.md"},{"label":"Changelog","href":"https://github.com/whilehq/whileai-sdk/blob/main/CHANGELOG.md"},{"label":"PyPI","href":"https://pypi.org/project/whileai"},{"label":"rlhfbook.com","href":"https://rlhfbook.com"}]}]},"search":{"prompt":"Search calls, knobs and guides"},"seo":{"metatags":{"og:site_name":"While","og:description":"The whileai SDK, import whileai as wai: a scientific post-training library for language models.","og:image":"https://docs.while.ai/assets/og-card.png","og:image:alt":"wai, the While whale","twitter:card":"summary_large_image"},"indexing":"all"},"fonts":{"heading":{"family":"Inter","weight":600},"body":{"family":"Inter"}},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":"vitesse-dark"},"latex":true},"contextual":{"options":["copy","view","claude","chatgpt","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"markdown":{"instructions":["Install with `uv add whileai`; import as `import whileai as wai`.","Run the offline path first (`simulator=False`, `wai.seeded_agent`, a callable judge); no key is needed for it.","Report every pass rate with its interval and n, as `scored.pass_at` prints it."]},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"crestoneai","hasAudioNarration":false,"actualSubdomain":"crestoneai","customDomains":["docs.while.ai"],"gitSource":{"type":"github","owner":"whilehq","repo":"whileai-sdk","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6acd48087f34923e6d8bb5ea","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Library","count":103},{"language":"default","tag":"Recipes","count":72},{"language":"default","tag":"Papers","count":20},{"language":"default","tag":"Community","count":17},{"language":"default","tag":"API reference","count":16},{"language":"default","tag":"API","count":16},{"language":"default","tag":"Train","count":14},{"language":"default","tag":"Measure","count":11},{"language":"default","tag":"Reference","count":11},{"language":"default","tag":"Platform","count":10}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--wai-ink: #0b1220;--wai-body: #4b5563;--wai-muted: #6b7280;--wai-line: #e5e7eb;--wai-surface: #f4f6f9;--wai-green: #5cb08a;--wai-green-deep: #3f8f6b;--wai-tint: #f0faf5;--wai-tint-strong: #d7f0e3;--wai-mono: \"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}#content-area code,#content-area pre,#content-area kbd,#content-area samp{font-family:var(--wai-mono);font-variant-ligatures:none}#content-area table,#content-area code{font-variant-numeric:tabular-nums}"}],"page":{"pagePath":"harness-optimization","slug":"/harness-optimization","pageMetadata":{"title":"Harness optimization from production traces","sidebarTitle":"Harness optimization","description":"A coding agent improves the prompt, the tools and the loop around a closed model on your own traffic. The gain is proven on days it never saw, on a second model, at the same cost.","href":"/harness-optimization"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"A coding agent improves the prompt, the tools and the loop around a closed model on your own traffic. The gain is proven on days it never saw, on a second model, at the same cost.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedImage}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What you learn:`}),` how a coding agent runs a harness search on yesterday’s traffic, what it reads, what it writes, and the three checks a change has to pass. `,_jsx(_components.strong,{children:`Needs:`}),` nothing for the dry run. `,_jsx(_components.strong,{children:`Takes:`}),` seconds offline, minutes per candidate with a key.`]}),`\n`,_jsx(OptimizedImage,{className:`mint-block dark:mint-hidden`,src:`https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-light.svg?fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=f48d05c1c7ea780d062c893789459b1b`,alt:`Traces split by day, the agent writes one candidate from the worst rows, the gate checks the holdout, a second model and cost, the pick serves, and the next day is scored with the same judge`,\"data-og-width\":`720`,width:`720`,\"data-og-height\":`300`,height:`300`,\"data-path\":`figures/harness-loop-light.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-light.svg?w=280\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=230902bda703cb6f0fa2787d215cb226 280w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-light.svg?w=560\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=600af8e6fcf235399d76a7e141424b52 560w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-light.svg?w=840\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=92fd54815d37a953cd899e7a2ee52a13 840w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-light.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=e5b7a63e68b38c73b8668088e65ed1b7 1100w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-light.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=279c8e15632f20b613e559c3a1cd103e 1650w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-light.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=53fb95d1958d7ada715a2abb97d3e7a7 2500w`}),`\n`,_jsx(OptimizedImage,{className:`mint-hidden dark:mint-block`,src:`https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-dark.svg?fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=102670191611c9bd0d24af4d8b4b2d0c`,alt:`Traces split by day, the agent writes one candidate from the worst rows, the gate checks the holdout, a second model and cost, the pick serves, and the next day is scored with the same judge`,\"data-og-width\":`720`,width:`720`,\"data-og-height\":`300`,height:`300`,\"data-path\":`figures/harness-loop-dark.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-dark.svg?w=280\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=ba6b3915b8c7e79903dee119b6a9d93e 280w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-dark.svg?w=560\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=1e1eaba857f4566ac491206a0745aed2 560w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-dark.svg?w=840\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=85e8a0ca36cac0239b72913016f8049b 840w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-dark.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=004f8efc0a44f0a5a2bce23bbd38231a 1100w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-dark.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=b54b727bc5995d09921b3bdb0e0f0139 1650w, https://mintcdn.com/crestoneai/llMe5LYki46Yfu0B/figures/harness-loop-dark.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=llMe5LYki46Yfu0B\u0026q=85\u0026s=ba2b0a7b084b6549c22b0893f8b0d791 2500w`}),`\n`,_jsx(_components.p,{children:`On a closed model the harness is the only thing you can change: the\ninstructions, the tools, the turn cap, the retry, how context is built.\nAmong comparable frontier models it explains more of the spread than the\nmodel does [1], and a harness searched with earlier candidates’ code and\ntraces in view beat the hand-built ones on TerminalBench-2 [2]. The catch:\ntuned on the tasks it was scored on, harness evolution gained 0.6 points\nheld out and lost to more samples of the baseline at the same budget [3].\nThe loop below is built around what the agent is not allowed to see.`}),`\n`,_jsxs(_components.p,{children:[`Runnable version:\n`,_jsx(_components.a,{href:`https://github.com/whilehq/whileai-sdk/tree/main/recipes/papers/meta-harness`,children:_jsx(_components.code,{children:`recipes/papers/meta-harness`})}),`.\nPlaybook for the coding agent:\n`,_jsx(_components.a,{href:`https://github.com/whilehq/whileai-sdk/tree/main/skills/harness-search`,children:_jsx(_components.code,{children:`skills/harness-search`})}),`.\nThe object it searches over: `,_jsx(_components.a,{href:`/reference/harness`,children:`the harness`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`1-traces-in`,children:`1. Traces in`}),`\n`,_jsxs(_components.p,{children:[`Point the recipe at yesterday’s export: a JSONL in any shape `,_jsx(_components.code,{children:`load_traces`}),`\nreads, or an OTLP JSON batch, which `,_jsx(_components.code,{children:`rows_from_otel`}),` groups into\nconversations. One task per distinct ask. Nothing leaves your machine.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#B8A965`,\"--shiki-dark\":`#B8A965`},children:`cd`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:` recipes/papers/meta-harness`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#80A665`,\"--shiki-dark\":`#80A665`},children:`python`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:` run.py`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:` --traces`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:` traces-2026-09-21.jsonl`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:` --propose`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:` --select`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:` --fresh`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Rows carry the ask, the steps, the reply and a timestamp. Extra keys pass\nthrough.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4D9375`,\"--shiki-dark\":`#4D9375`},children:`from`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` whileai`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`simulations `}),_jsx(_components.span,{style:{color:`#4D9375`,\"--shiki-dark\":`#4D9375`},children:`import`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` load_traces`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`rows `}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` load_traces`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`ts`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`2026-09-19T09:00:00Z`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`input`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`Where is my refund for ORD-5412?`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`output`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`Certainly! It went through.`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`ts`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`2026-09-21T09:00:00Z`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`input`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`Refund ORD-8821, the jacket arrived torn.`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`output`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`Done.`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#B8A965`,\"--shiki-dark\":`#B8A965`},children:`print`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`(`}),_jsx(_components.span,{style:{color:`#B8A965`,\"--shiki-dark\":`#B8A965`},children:`len`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`(`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`rows`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`),`}),_jsx(_components.span,{style:{color:`#B8A965`,\"--shiki-dark\":`#B8A965`},children:` sorted`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`(`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`rows`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`[`}),_jsx(_components.span,{style:{color:`#4C9A91`,\"--shiki-dark\":`#4C9A91`},children:`0`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`]))`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2 ['final_text', 'input', 'output', 'prompt', 'steps', 'ts']`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`2-the-split-the-agent-cannot-cross`,children:`2. The split the agent cannot cross`}),`\n`,_jsxs(_components.p,{children:[`The holdout is the latest days, whole days, until it holds half the tasks.\nThe proposer reads earlier days only. Train asks that are near-copies of a\nholdout ask (`,_jsx(_components.code,{children:`decontaminate`}),`, the 8-gram rule) leave its window too.\n`,_jsx(_components.code,{children:`out/split.json`}),` records it, and the proposal opens by saying which days\ndecide.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`split: holdout is 2026-09-20 and later: 16 of 24 tasks; 1 train prompt(s) overlapped the holdout and left the proposer's window`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`3-what-the-agent-reads`,children:`3. What the agent reads`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`out/proposal.md`}),`: every candidate so far as code, its pass@1 on the train\ndays with an interval over tasks, and its five worst rows. Nothing is\nsummarized. The proposer’s edge in [2] was raw traces, not digests.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## 00_baseline.py`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`train pass@1 0.71 [0.52..0.85] on 8 tasks; holdout 0.67 [0.50..0.83]; fingerprint 71fed4102190`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Worst rows:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- ask: I want my money back on ORD-5412 right now.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` reply: Certainly! Your refund went through.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` why: boilerplate in the reply; claimed success on a tool result that did not succeed`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`4-what-the-agent-writes`,children:`4. What the agent writes`}),`\n`,_jsxs(_components.p,{children:[`One file, one change, chosen from the worst rows. A candidate defines\n`,_jsx(_components.code,{children:`harness(model) -> wai.Harness`}),`. The fingerprint hashes the instructions,\nthe tool names and the `,_jsx(_components.code,{children:`Disclosure`}),` fields, so the edit is a new version\nwithout anyone naming it, and every row says which harness made it.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`38`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`38`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4D9375`,\"--shiki-dark\":`#4D9375`},children:`import`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` whileai `}),_jsx(_components.span,{style:{color:`#4D9375`,\"--shiki-dark\":`#4D9375`},children:`as`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` wai`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4D9375`,\"--shiki-dark\":`#4D9375`},children:`from`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` whileai`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`harness `}),_jsx(_components.span,{style:{color:`#4D9375`,\"--shiki-dark\":`#4D9375`},children:`import`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` Disclosure`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:`TOOLS`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` =`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`type`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`function`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`function`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`name`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`lookup_order`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`description`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`Look up an order by id.`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`parameters`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`type`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`object`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`properties`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`order_id`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`type`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`string`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`}},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`required`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` [`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`order_id`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`]`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:`BASE`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:` =`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`Look the order up before you act.`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`scripted `}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` wai`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`seeded_agent`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`(`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:`TOOLS`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` rate`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#4C9A91`,\"--shiki-dark\":`#4C9A91`},children:`0.3`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` seed`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#4C9A91`,\"--shiki-dark\":`#4C9A91`},children:`0`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`)`}),_jsx(_components.span,{style:{color:`#758575DD`,\"--shiki-dark\":`#758575DD`},children:` # stands in for the model offline`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`baseline `}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` wai`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`Harness`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` agent`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`scripted`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` instructions`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:`BASE`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` tools`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:`TOOLS`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` label`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`baseline`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` model`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`scripted`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`candidate `}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` wai`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`Harness`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` agent`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`scripted`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` instructions`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:`BASE`}),_jsx(_components.span,{style:{color:`#CB7676`,\"--shiki-dark\":`#CB7676`},children:` +`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:` Report what the tool returned; never claim success on an error.`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` tools`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:`TOOLS`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` label`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`report_fault`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` model`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:`scripted`}),_jsx(_components.span,{style:{color:`#C98A7D77`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:` disclosure`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`Disclosure`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`(`}),_jsx(_components.span,{style:{color:`#BD976A`,\"--shiki-dark\":`#BD976A`},children:`max_turns`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`=`}),_jsx(_components.span,{style:{color:`#4C9A91`,\"--shiki-dark\":`#4C9A91`},children:`4`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#B8A965`,\"--shiki-dark\":`#B8A965`},children:`print`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` baseline`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`version`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` baseline`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`fingerprint`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` candidate`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`version`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` candidate`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`fingerprint`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` baseline`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`fingerprint `}),_jsx(_components.span,{style:{color:`#CB7676`,\"--shiki-dark\":`#CB7676`},children:`!=`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:` candidate`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`.`}),_jsx(_components.span,{style:{color:`#DBD7CAEE`,\"--shiki-dark\":`#DBD7CAEE`},children:`fingerprint`}),_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#666666`,\"--shiki-dark\":`#666666`},children:`)`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`baseline 71fed4102190 report_fault 93c49a7ba181 True`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Then it runs the recipe again and reads `,_jsx(_components.code,{children:`out/selected.json`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`5-the-gate`,children:`5. The gate`}),`\n`,_jsx(_components.p,{children:`Three checks, all printed.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The pick.`}),` The candidate that leads the most train tasks, per task the\nbest pass rate across candidates with ties shared. Not the best mean: a\nmean gained by regressing a subset does not win [4].`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Is it real.`}),` On the held-out days the pick beats the baseline with a\npaired interval that excludes zero, and again on a second model. The\nheld-out tasks the baseline passed every time and the pick failed every\ntime are counted beside it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Did it just spend more.`}),` Cost per rollout is on the ledger: tokens when\nevery row carries usage, model calls otherwise. A pick may cost no more\nthan the baseline (`,_jsx(_components.code,{children:`--cost-margin 0`}),`). A candidate that wins by spending\nmore is a frontier point, and the verdict names the margin that would\naccept it [3].`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`train tasks led: 00_baseline.py 5, 01_no_filler.py 7, 02_check_result.py 12 -> pick 02_check_result.py`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`holdout on scripted: 02_check_result.py vs 00_baseline.py +0.27 [+0.15, +0.42] over 12 paired tasks, 0 the baseline passed and the pick failed -> clears zero`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`holdout on scripted-b: 02_check_result.py vs 00_baseline.py +0.50 [+0.38, +0.62] over 12 paired tasks, 0 the baseline passed and the pick failed -> clears zero`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cost per rollout: 02_check_result.py at 1.00x the baseline in calls -> within the margin`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`select: 02_check_result.py beats the baseline on the holdout and on a held-out model at 1.00x its cost`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`wai.harness.attribute`}),` over the candidate by model grid says whether the\nspread is the harness or the model.`]}),`\n`,_jsx(Heading,{level:`2`,id:`6-prune-the-pick`,children:`6. Prune the pick`}),`\n`,_jsx(_components.p,{children:`A pick that bundles five edits may owe its gain to two. On legal workspace\ntasks, harness evolution with no constraints raised its own split from 89.4\nto 92.8 but moved three unseen benchmarks only from 39.7 to 40.3, at 2.4x\nthe tokens. With constraints on what gets proposed and what gets kept, the\nunseen benchmarks reached 43.6 on 36% fewer tokens than the unconstrained\nrun. One of those constraints deletes components that stopped earning\ntheir place [7].`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`--prune`}),` does that to the pick. A candidate lists its changes as named\nedits, and the recipe takes each one out in turn and replays the train\ndays. An edit goes when the score without it is no lower and the cost per\nrollout is no higher. The pruned harness then faces the same gate, so the\nholdout still decides.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#80A665`,\"--shiki-dark\":`#80A665`},children:`python`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:` run.py`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:` --traces`}),_jsx(_components.span,{style:{color:`#C98A7D`,\"--shiki-dark\":`#C98A7D`},children:` traces-2026-09-21.jsonl`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:` --select`}),_jsx(_components.span,{style:{color:`#C99076`,\"--shiki-dark\":`#C99076`},children:` --prune`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`prune one_sentence: train 0.67 without it vs 0.92, 1.00x the cost in calls -> kept: removing it loses score or raises cost`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`prune turn_cap: train 0.92 without it vs 0.92, 1.00x the cost in calls -> dropped`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`prune retry: train 0.92 without it vs 0.92, 1.00x the cost in calls -> dropped`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`prune: 2 of 5 edits dropped (turn_cap, retry); the pruned harness clears the gate; copy out/02_check_result_pruned.py into candidates/ to keep it`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`The output above is the offline dry run, where the scripted agent ignores\nthe turn cap and the retry, so they always go. On a real model the turn cap\ncan cut tokens, and then the cost rule keeps it. The agent loops on steps 3 to 5 until\nthe gate passes or the rounds run out. A search that never clears is a\nresult too.`}),`\n`,_jsx(Heading,{level:`2`,id:`7-report-serve-next-day`,children:`7. Report, serve, next day`}),`\n`,_jsx(_components.p,{children:`Every candidate is posted as a harness version, so the Runs page groups the\ndots by harness. Under the pick, five lines from the ledger: Changed, Moved,\nWhy, Learned, Reproduce. You read one chart and decide.`}),`\n`,_jsxs(_components.p,{children:[`The holdout says what the pick can do on traffic it never saw. The next day\nsays whether that survived. The skill ends by scoring the day after with\nthe same judge and posting one `,_jsx(_components.code,{children:`LiveDay`}),`. A flagged rate near the holdout’s\nfailure rate closes the loop. One well above it makes that day the new\ntraces.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-dark vitesse-dark`,style:{backgroundColor:`#121212`,\"--shiki-dark-bg\":`#121212`,color:`#dbd7caee`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Moved: 67 to 73 points on 16 held-out tasks (holdout is 2026-09-20 and later), +6 [+2, +11]; 0 task(s) the baseline passed and it failed; 1.00x the cost per rollout.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`next day: 21 of 100 flagged; the holdout said 27 of 100`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`when-the-harness-is-not-enough`,children:`When the harness is not enough`}),`\n`,_jsxs(_components.p,{children:[`A search stalls when the model lacks something no prompt supplies. On a\nlegal classification task, harness edits alone reached 50 points and\nharness plus weight updates reached 70 [5]. On an open model the same\nheld-out test and judge carry over to training: `,_jsx(_components.a,{href:`/evals`,children:`evals`}),`, then\n`,_jsx(_components.a,{href:`/recipes/04-train/sft`,children:`SFT from traces`}),` or `,_jsx(_components.a,{href:`/recipes/04-train/grpo`,children:`GRPO`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`references`,children:`References`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Zhang, Y. et al. `,_jsx(_components.a,{href:`https://arxiv.org/abs/2605.23950`,children:`Stop Comparing LLM Agents Without Disclosing the Harness`}),`. 2026. Harness variance 7.8x model variance; `,_jsx(_components.code,{children:`Disclosure`}),` follows its checklist.`]}),`\n`,_jsxs(_components.li,{children:[`Lee, Y. et al. `,_jsx(_components.a,{href:`https://arxiv.org/abs/2603.28052`,children:`Meta-Harness: End-to-End Optimization of Model Harnesses`}),`. 2026.`]}),`\n`,_jsxs(_components.li,{children:[`Wang, Y. et al. `,_jsx(_components.a,{href:`https://arxiv.org/abs/2607.12227`,children:`Rethinking the Evaluation of Harness Evolution for Agents`}),`. 2026. Matched budgets; +0.6 held out when tuned on the scored tasks.`]}),`\n`,_jsxs(_components.li,{children:[`Agrawal, L. A. et al. `,_jsx(_components.a,{href:`https://arxiv.org/abs/2507.19457`,children:`GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning`}),`. ICLR 2026. Selection on the per-task frontier.`]}),`\n`,_jsxs(_components.li,{children:[`Hebbar, P. et al. `,_jsx(_components.a,{href:`https://arxiv.org/abs/2605.27276`,children:`SIA: Self Improving AI with Harness and Weight Updates`}),`. 2026.`]}),`\n`,_jsxs(_components.li,{children:[`Lambert, N. `,_jsx(_components.a,{href:`https://rlhfbook.com`,children:`Reinforcement Learning from Human Feedback`}),`, chapter `,_jsx(_components.a,{href:`https://rlhfbook.com/c/16-evaluation`,children:`Evaluation`}),`. 2025. The train split picks, the holdout decides.`]}),`\n`,_jsxs(_components.li,{children:[`Xia, P. et al. `,_jsx(_components.a,{href:`https://arxiv.org/abs/2609.24972`,children:`RRSI: Regularized Recursive Self-Improvement of Agent Harnesses`}),`. 2026. Edit budget, credit from history, exploration, leakage critic, noise floor, cost rule, pruning. Unseen benchmarks 39.7 to 43.6 against 40.3 for unconstrained evolution, at 2.42M vs 3.80M tokens per trial.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":"vitesse-dark"},"config":{},"pageMetadata":{"title":"Harness optimization from production traces","sidebarTitle":"Harness optimization","description":"A coding agent improves the prompt, the tools and the loop around a closed model on your own traffic. The gain is proven on days it never saw, on a second model, at the same cost.","href":"/harness-optimization"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Traces in","slug":"1-traces-in","depth":2,"children":[]},{"title":"2. The split the agent cannot cross","slug":"2-the-split-the-agent-cannot-cross","depth":2,"children":[]},{"title":"3. What the agent reads","slug":"3-what-the-agent-reads","depth":2,"children":[]},{"title":"4. What the agent writes","slug":"4-what-the-agent-writes","depth":2,"children":[]},{"title":"5. The gate","slug":"5-the-gate","depth":2,"children":[]},{"title":"6. Prune the pick","slug":"6-prune-the-pick","depth":2,"children":[]},{"title":"7. Report, serve, next day","slug":"7-report-serve-next-day","depth":2,"children":[]},{"title":"When the harness is not enough","slug":"when-the-harness-is-not-enough","depth":2,"children":[]},{"title":"References","slug":"references","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"dynamicCss":".mint-block {\n display: block\n}\n.mint-hidden {\n display: none\n}\n.dark\\:mint-block:is(.dark *) {\n display: block\n}\n.dark\\:mint-hidden:is(.dark *) {\n display: none\n}","subdomain":"crestoneai","siteName":"While","title":"Harness optimization from production traces - While","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-23T12:59:46.903Z","gitLastModified":"2026-09-23T12:59:40.000Z","originalFileLocation":"harness-optimization.md"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"A coding agent improves the prompt, the tools and the loop around a closed model on your own traffic. The gain is proven on days it never saw, on a second model, at the same cost.\">\u003cmeta data-mint-head name=\"application-name\" content=\"While\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Harness optimization from production traces - While\">\u003cmeta data-mint-head property=\"og:description\" content=\"The whileai SDK, import whileai as wai: a scientific post-training library for language models.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"While\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.while.ai/harness-optimization\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.while.ai/assets/og-card.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Harness optimization from production traces - While\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"The whileai SDK, import whileai as wai: a scientific post-training library for language models.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.while.ai/assets/og-card.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/crestoneai/gTrhHXFIoAO2tZh0/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"While\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3F8F6B\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"wai, the While whale\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.while.ai/harness-optimization\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/harness-optimization.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.while.ai/#organization\",\"name\":\"While\",\"url\":\"https://docs.while.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/crestoneai/hjeVhItGjBtdvUpc/logo/light.svg?fit=max\u0026auto=format\u0026n=hjeVhItGjBtdvUpc\u0026q=85\u0026s=fd40f337324aa68ac40e059afab7507a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.while.ai#website\",\"name\":\"While\",\"url\":\"https://docs.while.ai\",\"publisher\":{\"@id\":\"https://docs.while.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.while.ai/harness-optimization#webpage\",\"url\":\"https://docs.while.ai/harness-optimization\",\"name\":\"Harness optimization from production traces\",\"description\":\"A coding agent improves the prompt, the tools and the loop around a closed model on your own traffic. The gain is proven on days it never saw, on a second model, at the same cost.\",\"dateModified\":\"2026-09-23T12:59:40.000Z\",\"isPartOf\":{\"@id\":\"https://docs.while.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.while.ai/harness-optimization#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.while.ai/harness-optimization#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.while.ai/evals\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Harness optimization from production traces\",\"item\":\"https://docs.while.ai/harness-optimization\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.while.ai/harness-optimization#article\",\"headline\":\"Harness optimization from production traces\",\"name\":\"Harness optimization from production traces\",\"description\":\"A coding agent improves the prompt, the tools and the loop around a closed model on your own traffic. The gain is proven on days it never saw, on a second model, at the same cost.\",\"url\":\"https://docs.while.ai/harness-optimization\",\"mainEntityOfPage\":{\"@id\":\"https://docs.while.ai/harness-optimization#webpage\"},\"image\":\"https://docs.while.ai/assets/og-card.png\",\"dateModified\":\"2026-09-23T12:59:40.000Z\",\"publisher\":{\"@id\":\"https://docs.while.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.while.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"While\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"While","nav":{"global":null,"tabs":[{"tab":"Library","groups":[{"group":"Get started","pages":[{"title":"whileai","sidebarTitle":"Overview","href":""},{"title":"Install","sidebarTitle":"Install","href":"/get-started/install"},{"title":"Your model and your key","sidebarTitle":"Your model and your key","href":"/get-started/your-model-and-key"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/get-started/quickstart"},{"title":"Connect your agent","sidebarTitle":"Connect your agent","href":"/get-started/connect-your-agent"},{"title":"Integrations","sidebarTitle":"Integrations","href":"/integrations"}]},{"group":"Guides","pages":[{"title":"Evals for the agent you already have","sidebarTitle":"Evals","description":"A pass rate with an interval, a table of where the agent fails, and a CI check that turns red when it gets worse. Offline, no key, seconds.","href":"/evals"},{"title":"Harness optimization from production traces","sidebarTitle":"Harness optimization","href":"/harness-optimization"},{"title":"Reward hacking","sidebarTitle":"Reward hacking","description":"How the SDK looks for over-optimization before a run, during it, and after: the gap between training reward and the eval you care about.","href":"/reward-hacking"},{"title":"Safety evals","sidebarTitle":"Safety evals","href":"/safety-evals"},{"title":"Character training","sidebarTitle":"Character training","href":"/character-training"},{"title":"On-policy distillation","sidebarTitle":"Distillation","href":"/distillation"},{"title":"Groupwise grading","sidebarTitle":"Groupwise grading","href":"/groupwise-grading"},{"title":"Train a small context LM","sidebarTitle":"Context LM","href":"/context-lm"},{"title":"Trim SFT data to what the test can see","sidebarTitle":"Trim SFT data","href":"/trim"}]},{"group":"Concepts","pages":[{"title":"Constitution","sidebarTitle":"Constitution","href":"/concepts/constitution"},{"title":"How it works","sidebarTitle":"How it works","href":"/concepts/how-it-works"},{"title":"The engine","sidebarTitle":"The engine","href":"/concepts/engine"},{"title":"Check the math yourself","sidebarTitle":"Check the math","href":"/concepts/check-the-math"},{"title":"FAQ","sidebarTitle":"FAQ","href":"/concepts/faq"}]},{"group":"Recipes","pages":[{"title":"Recipes","sidebarTitle":"Overview","href":"/recipes/index"},{"group":"Simulate","pages":[{"title":"Bring your own agent","sidebarTitle":"bring-your-own-agent","href":"/recipes/01-simulate/bring-your-own-agent"},{"title":"SmolDataEnvs: data-analysis tasks with a reward that is a program","sidebarTitle":"smol-data-envs","href":"/recipes/01-simulate/smol-data-envs"},{"title":"Swarm rescue: passing rollouts on the tasks GRPO throws away","sidebarTitle":"swarm-rescue","href":"/recipes/01-simulate/swarm-rescue"},{"title":"Verifiers: verifiable rewards","sidebarTitle":"verifiers","href":"/recipes/01-simulate/verifiers"}]},{"group":"Measure","pages":[{"title":"Did my prompt rewrite really help?","sidebarTitle":"before-and-after","href":"/recipes/02-measure/before-and-after"},{"title":"Character to the wall","sidebarTitle":"character-to-the-wall","href":"/recipes/02-measure/character-to-the-wall"},{"title":"Which judge can you trust?","sidebarTitle":"compare-judges","href":"/recipes/02-measure/compare-judges"},{"title":"Evals for the agent you already have","sidebarTitle":"eval-your-agent","href":"/recipes/02-measure/eval-your-agent"},{"title":"Is your eval any good?","sidebarTitle":"is-your-eval-any-good","href":"/recipes/02-measure/is-your-eval-any-good"},{"title":"A model router, measured against random routing","sidebarTitle":"model-router","href":"/recipes/02-measure/model-router"},{"title":"pass@1, pass^k and pass@k for one agent","sidebarTitle":"pass-at-k","href":"/recipes/02-measure/pass-at-k"},{"title":"A public benchmark into the measurement","sidebarTitle":"public-benchmark","href":"/recipes/02-measure/public-benchmark"},{"title":"Reward hacking, caught three times","sidebarTitle":"reward-hacking","href":"/recipes/02-measure/reward-hacking"},{"title":"Safety evals for a tool-using agent","sidebarTitle":"safety-evals","href":"/recipes/02-measure/safety-evals"},{"title":"Safety evals for a marketplace agent","sidebarTitle":"safety-evals-marketplace","href":"/recipes/02-measure/safety-evals-marketplace"}]},{"group":"Select","pages":[{"title":"Character training from a constitution","sidebarTitle":"character","href":"/recipes/03-select/character"},{"title":"Synthetic RL data for Prime Intellect","sidebarTitle":"prime-intellect-rl","href":"/recipes/03-select/prime-intellect-rl"},{"title":"One row, six training targets","sidebarTitle":"schema","href":"/recipes/03-select/schema"}]},{"group":"Train","pages":[{"title":"Train your own decision model router","sidebarTitle":"decision-router","href":"/recipes/04-train/decision-router"},{"title":"DPO on Modal, with the dashboard watching","sidebarTitle":"dpo","href":"/recipes/04-train/dpo"},{"title":"Train on Fireworks, serve on Fireworks, prove it through the same API","sidebarTitle":"fireworks","href":"/recipes/04-train/fireworks"},{"title":"GRPO on Modal, with the dashboard watching","sidebarTitle":"grpo","href":"/recipes/04-train/grpo"},{"title":"The hosted loop: push, train, serve, call","sidebarTitle":"hosted-loop","href":"/recipes/04-train/hosted-loop"},{"title":"Identity dataset generator","sidebarTitle":"identity","href":"/recipes/04-train/identity"},{"title":"Train a model router","sidebarTitle":"model-router","href":"/recipes/04-train/model-router"},{"title":"ParseBench: hill-climb an open document-parsing agent","sidebarTitle":"parsebench","href":"/recipes/04-train/parsebench"},{"title":"GRPO, OPSD and OPD on prime-rl, on Modal, with your keys","sidebarTitle":"prime-rl","href":"/recipes/04-train/prime-rl"},{"title":"Prompt-injection classifier","sidebarTitle":"prompt-injection-classifier","href":"/recipes/04-train/prompt-injection-classifier"},{"title":"Report a run so a person can decide","sidebarTitle":"report-run","href":"/recipes/04-train/report-run"},{"title":"Resist a planted instruction","sidebarTitle":"resist-planted-instruction","href":"/recipes/04-train/resist-planted-instruction"},{"title":"SFT on your own GPU, from the course's own export","sidebarTitle":"sft","href":"/recipes/04-train/sft"},{"title":"Text-to-SQL: hill-climb a model on your schema with a verifier as the reward","sidebarTitle":"text-to-sql","href":"/recipes/04-train/text-to-sql"}]},{"group":"Export","pages":[{"title":"Serve a trained adapter on Amazon Bedrock","sidebarTitle":"bedrock-import","href":"/recipes/05-export/bedrock-import"},{"title":"Hugging Face, both directions","sidebarTitle":"hugging-face","href":"/recipes/05-export/hugging-face"}]},{"group":"Papers","pages":[{"title":"Papers","sidebarTitle":"Overview","href":"/recipes/papers/index"},{"title":"Adaptive clip: the upper bound follows how rare a correct answer was","sidebarTitle":"adaptive-clip","href":"/recipes/papers/adaptive-clip"},{"title":"Board writers: pay a note by what it did for the copies that read it","sidebarTitle":"board-writers","href":"/recipes/papers/board-writers"},{"title":"BPCO bounded critic: a critic that can only say a number the reward could be","sidebarTitle":"bpco-bounded-critic","href":"/recipes/papers/bpco-bounded-critic"},{"title":"Context LM: a small model that keeps its own context as a file","sidebarTitle":"context-lm","href":"/recipes/papers/context-lm"},{"title":"Endpoint SFT: keep the two ends of the reasoning trace, drop the middle","sidebarTitle":"endpoint-sft","href":"/recipes/papers/endpoint-sft"},{"title":"Filter metric: phantom advantages under a shaped reward","sidebarTitle":"filter-metric","href":"/recipes/papers/filter-metric"},{"title":"FlashREINFORCE: one stale rollout per prompt, corrected, gated, length-normalized","sidebarTitle":"flash-reinforce","href":"/recipes/papers/flash-reinforce"},{"title":"GMTS: rank tokens by entropy times advantage, not by entropy alone","sidebarTitle":"gmts-token-select","href":"/recipes/papers/gmts-token-select"},{"title":"Harness and weights: both levers against either alone","sidebarTitle":"harness-and-weights","href":"/recipes/papers/harness-and-weights"},{"title":"Hint distillation: imitate what passed, correct what failed with a hint","sidebarTitle":"hint-distill","href":"/recipes/papers/hint-distill"},{"title":"Message board: teach copies of a model to read each other's notes","sidebarTitle":"message-board","href":"/recipes/papers/message-board"},{"title":"Meta-Harness: search over the harness, gate on held-out tasks and models","sidebarTitle":"meta-harness","href":"/recipes/papers/meta-harness"},{"title":"Benchmarking PTGS against Reinforce-Ada and GRPO","sidebarTitle":"ptgs","href":"/recipes/papers/ptgs"},{"title":"Reinforce-Ada: keep sampling a prompt until its group can teach something","sidebarTitle":"reinforce-ada","href":"/recipes/papers/reinforce-ada"},{"title":"SAO single rollout: one rollout per prompt, a critic, and a token band under a stale sampler","sidebarTitle":"sao-single-rollout","href":"/recipes/papers/sao-single-rollout"},{"title":"Talk methods: which training teaches two model copies to talk best","sidebarTitle":"talk-methods","href":"/recipes/papers/talk-methods"},{"title":"Talk to solve: two copies of a model, half the facts each","sidebarTitle":"talk-to-solve","href":"/recipes/papers/talk-to-solve"},{"title":"Team talk: train a model to reason as a team talking to itself","sidebarTitle":"team-talk","href":"/recipes/papers/team-talk"},{"title":"Zero RL on a base model: a rigid format reward costs accuracy","sidebarTitle":"zero-rl-format-reward","href":"/recipes/papers/zero-rl-format-reward"}]},{"group":"Community","pages":[{"title":"Community recipes","sidebarTitle":"Overview","href":"/recipes/community/index"},{"title":"The airline voice agent, and the filter metric that is right in the paper and wrong on my traffic","sidebarTitle":"airline-voice-concise-under-probe-outcome-filter","href":"/recipes/community/airline-voice-concise-under-probe-outcome-filter"},{"title":"Can the judge be trusted?","sidebarTitle":"can-the-judge-be-trusted","href":"/recipes/community/can-the-judge-be-trusted"},{"title":"Can the markers be trusted?","sidebarTitle":"can-the-markers-be-trusted","href":"/recipes/community/can-the-markers-be-trusted"},{"title":"Fine-tune a Deep Agents reviewer from its LangSmith traces, with and without While","sidebarTitle":"deepagents-review-four-arms","href":"/recipes/community/deepagents-review-four-arms"},{"title":"Force the branch, or your policy marker is scoring the agent's mood","sidebarTitle":"force-the-branch","href":"/recipes/community/force-the-branch"},{"title":"GRPO group size, with the budget held still","sidebarTitle":"grpo-group-size-at-fixed-budget","href":"/recipes/community/grpo-group-size-at-fixed-budget"},{"title":"Two hosted runs on the same rows, and the warning only one of them gives you","sidebarTitle":"hosted-grpo-vs-sft","href":"/recipes/community/hosted-grpo-vs-sft"},{"title":"How much contamination survives `decontaminate()`?","sidebarTitle":"how-much-contamination-survives","href":"/recipes/community/how-much-contamination-survives"},{"title":"The selector is the alignment step: teaching an agent its identity is what makes it leak it","sidebarTitle":"identity-spec-no-unasked-maker-aas","href":"/recipes/community/identity-spec-no-unasked-maker-aas"},{"title":"Does a reasoning model learn to write for its judge?","sidebarTitle":"judge-aware-hacking","href":"/recipes/community/judge-aware-hacking"},{"title":"Process reward or outcome reward: does the ten-point gap survive?","sidebarTitle":"process-vs-outcome-reward","href":"/recipes/community/process-vs-outcome-reward"},{"title":"One entry point, or your before/after measures the SDK","sidebarTitle":"same-entrypoint-before-after","href":"/recipes/community/same-entrypoint-before-after"},{"title":"The step the course skips","sidebarTitle":"the-step-the-course-skips","href":"/recipes/community/the-step-the-course-skips"},{"title":"What TRL does with the loss mask","sidebarTitle":"what-trl-does-with-the-loss-mask","href":"/recipes/community/what-trl-does-with-the-loss-mask"},{"title":"Which half of my agent's traffic can a 1.5B model take over?","sidebarTitle":"which-half-can-a-small-model-take","href":"/recipes/community/which-half-can-a-small-model-take"},{"title":"Who protects the held-out set: the ids, or the text?","sidebarTitle":"who-protects-the-holdout","href":"/recipes/community/who-protects-the-holdout"}]}]},{"group":"Reference","pages":[{"title":"Constitution","sidebarTitle":"Constitution","href":"/reference/constitution"},{"title":"Reference overview","sidebarTitle":"Overview","href":"/reference/overview"},{"title":"The five calls","sidebarTitle":"Five calls","href":"/reference/five-calls"},{"title":"Rows: the contract every measurement reads","sidebarTitle":"Rows","href":"/reference/rows"},{"title":"The harness","sidebarTitle":"Harness","href":"/reference/harness"},{"title":"The methods, in symbols","sidebarTitle":"Methods","href":"/reference/methods"},{"title":"Style: how the language reads","sidebarTitle":"Style","href":"/reference/style"},{"title":"Design: how the docs look","sidebarTitle":"Design","href":"/reference/design"},{"title":"What to run","sidebarTitle":"What to run","href":"/reference/what-to-run"},{"title":"Parameters and output","sidebarTitle":"Parameters","href":"/reference/parameters"},{"title":"Package layout and development","sidebarTitle":"Development","href":"/reference/development"}]}]},{"tab":"Learn","pages":[{"title":"Learn","href":"/learn"}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/platform"}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api"}]}]},"basePath":"","title":"Harness optimization from production traces - While","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-CLQdF-Ar.js","lightbox-handle-r17bVUz3.js"]}