Harbor benchmark adapter
Harbor datasets such as FrontierHarness Eval score a coding agent inside each task's container. scripts/benchmarks/harbor_agent/agent.py makes OpenProgram one of those agents: it installs the CLI in the container, runs the instruction with openprogram --print, and hands Harbor the run's tokens and cost. The openprogram package never imports it, and Harbor is not an OpenProgram dependency.
- Host
harbor run -m provider/id; the key comes from the shell - Installuv, Python 3.12 and
openprogramunder/installed-agent/openprogram - Keyin the run's environment only, never stored
- Run
openprogram --printin the task's working directory - Agent resultfrom
agent/openprogram-usage.jsonin the trial folder
| Concern | Rule |
|---|---|
| Code under test | A wheel built from one commit and uploaded, or a published Git ref; exactly one. A Git ref must arrive as a string: Harbor reads --ak values as JSON, and a commit id that reads as a number is refused rather than rewritten |
| Install | As root, by a pinned uv, on a uv-managed Python 3.12 apart from the task's own; readable by any agent user. Every dependency is held to the commit's uv.lock by a required constraints file, so every trial runs the same code; the installed versions go into the trial's logs. curl is installed only when the image lacks it. A bundle of the same install, packed once per commit, is unpacked instead on an x86_64 glibc image: seconds, no network |
| Key | Harbor resolves it for -m (or --api-key-name) from the host; it reaches only the run command, under the provider's own variable (OPENAI_API_KEY; --ak key_env= names another). Nothing logs in or is stored. A missing key stops the job before any trial starts. A credential found in the state when the run ends is deleted |
| Model | -m is OpenProgram's provider/id; --ak provider= renames the provider when Harbor and OpenProgram differ |
| Run | As the task's agent user, in the image's working directory. The instruction reaches --print=- on stdin, never as a flag; stdout (events) and stderr go to separate files. No tool-round limit; approvals refused; core files off, so a process that aborts leaves nothing in the graded directory |
| Run note | Beside the instruction, every request tells the model that no one is watching and it must carry the task to the end, sent once and with the same bytes every round so the provider's cache keeps matching. Shell commands read /proc on Linux, so an image without ps runs them |
| Request | The product's own: system prompt with the working directory and shell, and the tool list in the next row. The first user message carries the date and the run note in front of the instruction; a container's fresh home has no memory, so no memory map is sent. The date is the only part that differs between runs on different days |
| Tools | The product's default 27 loaded: files and shell (bash, read, write, edit, apply_patch, glob, grep), background jobs, sub-agents and goals, todos and reminders, four MCP tools, tool_search, and on a macOS host computer_use. 31 more (web_fetch and web_search among them) wait behind tool_search. Sub-agents, goals and reminders count in the score and the cost. --no-web drops every web tool and provider search. Captured on a macOS host; a Linux container's list is not yet checked |
| Workspace | --no-project-binding: nothing is written into the graded working directory, so there is no marker to clean up |
| Failure | A non-zero exit, a missing usage summary, or one that is not completed with at least one model request fails the trial |
| Error type | From the usage summary alone, never from the run's output, which holds the model's text |
| Provider's failure | A run the provider ended, before its turn or after OpenProgram's own retries in it, is reported by its cause (authentication, rate limit, server, network, unknown model); a turn that ended on a stream idle bound as a stalled response, in whatever words the provider's reader names it |
| Classification | The one --print records where it caught the exception (error_kind, error_reason) is looked up first; a build that records none, or a dropped connection the reason does not tell from a stall, is read from the error's wording |
| Any other failure | The plain non-zero exit, the agent's |
| Timeout | When Harbor's agent timeout ends the run, OpenProgram gets SIGTERM: it cancels the turn, waits up to 30 seconds for it to stop (2 seconds from the cancel once a second signal comes), writes the usage summary and the transcript, and exits 143, whenever a further signal lands |
| Finish | After every run, whatever ended it (success, failure, Harbor's timeout after the stop): OpenProgram's state in the agent's home is copied to agent/openprogram-state/ of the trial without auth/ and cache/, then the credential is deleted; a named profile's state goes to openprogram-state-<profile>/ the same way. The step fails when any credential is left. It runs as the agent user, whose home holds the state; a failure is logged and never replaces the run's own outcome |
| Rebuild | Then, when the run left no transcript (killed outright, or out of memory), openprogram transcript builds it from the state the run left, with the code --transcript-file runs. A transcript already there is kept. The order is fixed: stop, copy the state and delete any credential, rebuild |
| Exit | No model request beside the turn (a title, a branch name, topic sorting), and no hand-off to memory, which past its threshold is a model run; the next worker's idle pass writes the conversation into memory. |
| Leaving after a stop | The command waits on an event the turn sets, not on its thread: on Python 3.12 a signal during Thread.join marks a running thread stopped. A turn still busy when the wait ends has the commands it was waiting on stopped, since each runs under a supervisor that outlives the process; the process then leaves without the interpreter's shutdown |
| Further signals | Only the first is raised; its handler holds the rest. A signal noted while the run stops leaves once the files are written, one while the interpreter joins its threads leaves at once. Both stop the turn's commands first: the turn has ended, but the thread that stops its command may not have got there, and leaving at once ends that thread. From the exit callbacks on they are ignored, so the status stays the first signal's (143 for SIGTERM) |
| Evidence | --transcript-file writes the turn as stored, one JSON line per record: each model request with its time and tokens, the reasoning, reply text, tool calls with full arguments, and each tool result with its time; nothing scrubbed. On the host it becomes Harbor's trajectory.json (ATIF), one step per request, for harbor view |
| Killed outright | A process killed outright writes neither file; its transcript is rebuilt from the state (see Rebuild), and its state copy holds the session log with the turn's journal and the usage ledger with each request's tokens |
| Tool results | Each result comes from the turn's journal in the session log; one the journal lacks falls back to the store's 4,000-character preview, with complete false |
| Result size | The output is the result as the model read it: at most the model's tool-output weight (10,000 by default, a CJK character weighing 1 and any other 0.25) or 30% of its window, the whole text in a file the model pages with read; the shell tool keeps the end of a long output and says how many bytes it dropped |
| Network | The provider's public API host from Harbor's registry is reported, so an allowlisted task opens it |
Usage
| Harbor field | From the usage summary |
|---|---|
n_input_tokens | uncached input + cache reads + cache writes |
n_cache_tokens | cache reads |
n_output_tokens | output |
cost_usd | OpenProgram's priced total; empty when any request had no price, so Harbor prices the tokens itself |
model_usage | the same per model, sub-agents included |
metadata.openprogram | how the run ended, model requests, rounds, tool calls, cache writes, and requests by what they were for (by_call_kind: a compaction's cost apart from the turn's rounds) |
trajectory.json | totals and cost; each step's prompt, cached and completion tokens come from the transcript |
The full run
scripts/benchmarks/frontier_eval.py runs a target: a file in scripts/benchmarks/targets/ holding the whole method of one evaluation, each part with where it was published. Comparability comes from a control harness in the same job, not from published numbers taken under other conditions.
| Target | Tasks × attempts | Model, effort | Control |
|---|---|---|---|
fh-v1-tb21 (default) | FrontierHarness v1's 21 Terminal-Bench tasks (terminal-bench@2.0) × 3; 2 retries; the first valid attempt per task is the published rate | gpt-5.6-terra, medium | Codex 0.148.0 |
fh-v1.1 | FrontierHarness v1.1's 62 pinned tasks × 4; 2 retries | gpt-5.6-sol, medium | Codex 0.148.0 |
tb2 | Terminal-Bench 2.0's 89 tasks × 5; no retries; no timeout or resource override accepted | gpt-5.6-terra, medium | Codex 0.148.0 |
- Job: OpenProgram and Harbor's own adapter for the control harness at its pinned version, given the target's reasoning effort, on the same tasks, model and network. Harbor 0.25.0, the target's retry policy (applied by the launcher), which rate it publishes, the environments it counts as comparable (Runta) and its prices are all in the file.
- Time limits: each task's own agent timeout, 600 to 1,800 seconds for the 21 tasks, as in FrontierHarness. Its runner also limits one task's whole
harbor run -r 2, retries included, to 5,400 seconds. Harbor has no such limit, so the summary counts the kept trials that ran longer; deleted retries' time is missing from it. - Departures: another model, fewer attempts, a subset of tasks, a timeout cap, an agent environment variable, no control, a non-comparable environment or another Harbor version are each written into the run's record with
methodology_comparable: false. - Effort: both agents get the target's reasoning effort, OpenProgram through
--print --effort;--efforton the launcher sets another for both, a departure. A build whose--printtakes no--effortruns at its Agent's default, a departure too. - Web: the target's
disable_web_search(false in every target, as in the published runs) goes to both agents alike when true, and is written into the run's record. - Pilot:
run --pilotruns the target's eight pilot tasks, a recorded departure. They are fixed from FrontierHarness v1's per-task pass share in three tiers: hard (0.2 or less)kv-store-grpc,dna-insert,extract-elf; medium (0.3 to 0.5)chess-best-move,gcode-to-text; easy (0.8 or more)regex-log,sanitize-git-repo,build-cython-ext. - Check: Docker, the Harbor version found, the key, free disk.
- Build: a wheel and constraints from one commit by
git archive, so an unpublished commit works; the bundle for local Docker. Beforeuv buildthe commit and build time are written into the source asopenprogram/_build_info.py, so the installed--versionand every run header name the commit without the launcher's record beside them. - Retries: Harbor retries nothing (
max_retries: 0). After it exits, the launcher runs up to the target'smax_retriesrounds. Each moves the trials Harbor'sRetryConfigwould retry, and failed verifier setups, tojobs/<job>.retried/<trial>/<n>/with a ledger line, then runsharbor job resume. - Retry folder: beside the job, because resume deletes any folder in it without a
result.json. No round starts once the budget is spent or the job was stopped. - Budget: stops the job once every attempt so far costs that much. Each OpenProgram attempt appends its cost to a ledger beside the job, and every attempt set aside, of either agent, has its line there with the reason.
- Dropped attempts:
--rerun-infrawrites each one to the ledger with its reason, keyed by trial name and start time, so a control trial rerun under the same name keeps both costs. - Resume: refused when the wheel, the bundle or the target changed.
--rerun-inframoves the trials counted as infrastructure or cancelled aside and runs them again; the retry rounds go on from where they stopped. - Summary: each trial passed, agent failure, infrastructure or cancelled.
- Per agent: pass rate over passes and agent failures; FrontierHarness's first valid attempt per task; which of these the target publishes.
- First-attempt pass rate: a trial does not count when an earlier attempt ended for the agent's own reason; a retry for the provider, network or container does not count against it. Both agents in a job the launcher retried; OpenProgram only in an older job, where Harbor retried and deleted the control's attempts.
- Also per agent: retries and their kinds; cost of every attempt as reported, and the retried attempts' share; cost at the target's prices; cost per pass over the kept trials at those prices, the same attempts for both agents; container hours; trials over the wall-clock limit.
- Paired with the control: the n-th scored attempt of each on a task form a pair; McNemar's exact test on the pairs where only one passed; the smallest gap that many pairs can show at 5% and 80% power. Attempts on one task are not independent, so both read optimistic when tasks are few.
- Infrastructure needs evidence: an infrastructure error type, a provider or network cause in the usage summary (said to be before the turn or in it), a verifier whose own setup failed before any test ran, or a verifier that never started. A verifier timeout after the tests ran counts against the agent.
What it does not do
- No cost cap inside the agent (
--max-budget-usd): a task that fails because its money ran out is a result the cap made, not the harness. Codex has none and FrontierHarness caps only wall time; Harbor leaves Claude Code's and mini-SWE-agent's caps off by default. Spend is bounded outside the agent, by the launcher's ledger and SIGINT. - No second, live transcript: the journal and the ledgers are already written record by record; the transcript is derived from them, once, on exit or afterwards.
Commands for an oracle smoke, one task and a full run, on local Docker and on Runta: scripts/benchmarks/harbor_agent/README.md.
Before a full run
| Need | What to provide |
|---|---|
| Harbor | 0.25.0 on PATH or in $HARBOR: uv tool install "harbor[runta]==0.25.0". |
| Somewhere comparable to run | A Runta account (runta login, --env runta). Local Docker on Apple silicon checks the pipeline only: images run emulated, Docker has 4 CPUs and 7.7 GB, and batched-eval-parity also needs docker buildx. |
| API key | One for the model's provider (OPENAI_API_KEY for openai/..., or --key-profile) with the budget below as headroom and a rate limit for 4 to 16 trials at once. A subscription sign-in such as openai-codex has no key to pass into a task container. |
| The model | The target names it and the reasoning effort (gpt-5.6-terra, medium); both agents get that effort. Choose another only knowingly: the run is then not comparable to the target. check does not ask whether the provider lists the model. |
A build with --effort | --ref must name a commit whose --print takes --effort; run reads the wheel and says when it does not. |
| Checks before paying | One OpenProgram trial on the cheapest model: its transcript's run record names the tools loaded in the Linux container and what the first request sent (model, effort, include, store), and its usage summary the effort. Then an oracle pass over the 21 tasks on Runta, and the 8-task pilot (run --pilot). |
| The build | --ref stable by default; the wheel and the 209 MB bundle are built once per commit. |
| Cost | fh-v1-tb21: 21 tasks × 3 attempts × 2 agents = 126 trials. At $2 to $4 per trial (FrontierHarness v1 published about $2.3 per Codex trial), $250 to $500 of model spend, plus the sandbox's container hours, which the summary counts. A pilot of 8 tasks × 1 attempt × 2 agents is $30 to $65. fh-v1.1: 62 × 4 × 2 = 496 trials. |
| Time | About 10 minutes of wall time per trial, longer tails to an hour; a verifier image can take 16 minutes to pull. fh-v1-tb21 at concurrency 8 is 3 to 5 hours. |
| What a result can show | 21 tasks × 3 paired attempts detect a gap of about 15 to 20 points; a smaller one is reported as no clear difference. Smaller gaps need tb2 (89 tasks × 5). |
| Submission | Ask the maintainers before a full run; new runs are unranked (methodology_comparable: false). |
Why this design
| Topic | Follows | Why |
|---|---|---|
| Encrypted reasoning always asked for | Codex (OpenCode alike) | With store: false the server keeps no reasoning: a reasoning model still reasons and bills without the request asking for it back, and the next tool round loses it. Codex asks every time; Pi only with an effort. include is a top-level parameter, so earlier prefix bytes and the cache are unchanged |
Off is effort: "none" | Pi (the bytes Codex sends) | No reasoning field leaves the server reasoning at its default, which is not what turning thinking off says. Pi sends its map's off value, and nothing where a model maps off to nothing; models older than none (o-series, gpt-5 to gpt-5-pro) do that here |
| Key in the run's environment | Harbor's Codex and Claude Code adapters | Both pass the key as the provider's variable of one process; a login step wrote a credential that then had to be found and deleted |
| Launcher retries | FrontierHarness | It archives an attempt before retrying and never replaces a valid one. Harbor deletes a trial's folder before its own retry, so the control's earlier attempts were lost and its first-attempt rate could not be counted. Harbor's trial hook would need a Python entry point instead of harbor run |
| Transcript from state | Codex and Claude Code adapters | Both write their session record by record and derive the trajectory afterwards. One path means a killed run's transcript is the one a finished run writes; a live second copy could disagree with it |
| Commit in the build | Claude Code | It injects its version and build time at build time. A trial folder read on its own has no launcher record beside it; a source checkout is unchanged |
--no-web | Harbor (its Codex and Claude Code adapters) | Both declare native web tools and turn them off on disable_web_search. One switch for both sides allows a run with web off; the default stays on, as published |
| Pilot tasks | FrontierHarness's own per-task data | Five of the earlier eight passed every v1 trial and showed neither the cost tail nor a gap; hard tasks show timeouts and the tail, so each tier is there. Its smoke task regex-log is among them |
| No cost cap in the agent | Codex, FrontierHarness | See What it does not do |
Implementation status
| Item | State |
|---|---|
| Run | Seven trials of one task under local Docker. gpt-5-mini scored 0 in five: every program run through its evaluator stopped at the interpreter's parenthesis check (in the replayed trial, every version had unbalanced parentheses). gpt-5.6-sol wrote a correct one twice: one, stopped from outside before scoring, passes all 63 programs offline; the other passed 61, too slow under emulation for the verifier's 60-second limit (66 seconds offline; the first, 14). Cached input 74% to 97% |
| Five-task sample | One attempt each under local Docker, gpt-5.6-sol: fix-git passed; bun-sourcemap-leak 0, the model's (25 of 36 tests); sqlite-with-gcov 0 because the verifier could not download uv, so infrastructure; two turns ended on a 300-second stalled stream. Rerun with an 1800-second bound, no gap between requests passed 39 seconds. Install by bundle 8 to 10 seconds, against 3 to 16 minutes per trial before. $0.16 to $1.03 and 2 to 9 agent minutes per finished trial |
| Stalled streams | A request whose stream stalls is sent again whole, up to 5 attempts, each counted as a model request; a turn that still ends on a stall reports the provider's own words verbatim. Checked with a scripted provider through --print, not yet in a live trial |
| Headless smoke | The trial's run command on the host, on openai-codex/gpt-5.6-luna in a fresh home: three small tasks completed with 3 to 9 requests, cached input 92% to 98% from the second request on, except 40% on the request after a new 20,000-character shell output. The Harbor side of resume was checked against a stand-in that follows Harbor 0.25.0's source, not a real job |
| Offline verifiers | A verifier with allow_internet=false (batched-eval-parity) cannot run under local Docker: no-network is refused, and the egress sidecar needs docker buildx |
| Task images | An image without ps runs shell commands, checked in python:3.12-slim and in a trial |
| Early stop | gpt-5-mini ended one run after a quarter of the task's time asking whether to go on; gpt-5.6-sol ended one after 6 of 40 minutes, sure it was done, having stopped its own slowest check |
| Evidence | Transcript and trajectory written by real trials and checked call by call: no tool truncated or corrupted a file. Those trials' transcripts were written before full outputs were kept, so a result over 4,000 characters appears there as its preview. A process killed outright leaves neither file; the state copy after a SIGKILL was checked with a stand-in CLI under bash, not in a trial |
| Error type | Checked against Harbor 0.25.0's own matcher: a run whose output quoted "invalid api key" and "rate limit" was typed an authentication error before, and is now the plain failure unless the usage summary names a cause. A local trial with a placeholder OpenAI key recorded the provider's 401 in the summary; a test written from that text types it an authentication error |
| Credential and state copy | One local Docker trial (fix-git, placeholder key): agent/openprogram-state/ held the session log and the usage ledger (360 KB), no auth/, and the key appeared nowhere in the trial's files. An attempt's step order and which commands Harbor's matcher may type are plain functions, tested without Harbor; the adapter's use of them only where Harbor is installed. Not checked in a trial: the timeout path, a named profile |
| Targets and control | harbor run --dry-run on Harbor 0.25.0 accepted the job of fh-v1-tb21 narrowed to one task: two trials, OpenProgram and Codex 0.148.0 given reasoning_effort=medium. All 21 task names resolve in terminal-bench@2.0 (89 tasks). No paid trial has run with the control |
| Reasoning effort | --print --effort sets one turn's effort without saving it; the adapter declares reasoning_effort and atif to Harbor and passes the effort on. Tested with a scripted provider, not yet in a trial. On OpenAI's Responses API every reasoning model asks for its encrypted reasoning, whatever the effort, and off sends effort: "none" where the model takes it; both are request-building tests, not yet checked against the live API |
| Run header | The transcript's run record names the version, the effort asked for, the permission mode, hashes of the run note and the system text, and what the first request sent: model, effort, include, store, every tool and web tool, no_web, the tool-output weight, and the build's commit. Each request record adds its effort, include, store and tool-list hash, read where the adapter builds the body. Not yet seen in a Linux container |
| Error kind | The adapter types a failure by the category --print records (stream_idle is a stall), then by the provider's reason; the wording is read only when neither settles it. The patterns go once one Harbor trial types every failure the same both ways |
| Request recording | The provider recorder (openprogram recordings record, off in trials) reads only the lines added since its last request, so its memory per request no longer grows with the file. That rereading was the likely cause of the 378 MB recording's out-of-memory kill; not yet rerun on that task |
| Rebuilt transcript | A run's transcript rebuilt from its state equals the one it wrote, record for record but the run header, with a scripted provider; the shell step against a stand-in CLI under bash; not yet in a trial. Records carry no time of their own yet: a tool result's time is still inferred from the next request |
| Launcher retries | Rounds, the archive beside the job and both agents' first-attempt rates checked against a stand-in for harbor job resume, not a real job |
| Web tools off | --no-web through --print with a scripted provider. Harbor's acceptance of native_web_tools and disable_web_search for this adapter is read from Harbor 0.25.0's source, not yet a dry run |
| Timed-out trials | Checked in python:3.12-slim with a scripted provider: SIGTERM in a request, a tool or between rounds, Ctrl-C, a second SIGTERM, a turn that ignores the stop. No core file and nothing requested beside the turn; both files written; exit 130 (before SIGTERM exited 143; not rerun). Not yet run in a real trial or under Runta |
| Bundle | A bundle of stable built in 4 minutes (209 MB, glibc 2.31) and installed in 6 seconds in a terminal-bench image without network, where a run failing to reach the provider was reported as a network failure |
| Stop on the host | In the headless smoke, a SIGTERM during a shell command stopped the run in 1.1 seconds: exit 130 (SIGTERM now exits 143), both files written, the command and the marker gone |
| A second signal | On macOS, a second SIGTERM 0 to 0.4 seconds after the first during a tool's command: exit 130 (now 143) within 0.6 seconds, the command gone. A turn that ignores the stop ends the command after 30 seconds, or 2 seconds after the cancel on a second signal |
| Pilot and full run | Not run: they need a Runta account, an API key with its budget, and the owner's go-ahead to spend it |
| Leaderboard | No public submission process; new runs are unranked until a control harness runs under the same network policy |