8000 Examples: five Harbor benchmarks with baselines and their papers' methods by iamziyuzhao · Pull Request #106 · Infini-AI-Lab/hermit · GitHub
[go: up one dir, main page]

Skip to content

Examples: five Harbor benchmarks with baselines and their papers' methods - #106

Merged
haizhongzheng merged 18 commits into
mainfrom
harbor-benchmark-examples
Nov 18, 2026
Merged

haizhongzheng merged 18 commits into
mainfrom
harbor-benchmark-examples

Conversation

@iamziyuzhao
@iamziyuzhao iamziyuzhao commented Nov 12, 2026 •
Copy link
Copy Markdown
Collaborator

Change

#105, this PR's base, makes a Harbor task set the one way a benchmark enters Hermit, but packages no benchmark on it.
This PR adds five, each ready to hand to someone with a Docker host: the registry's task set in a
utils/benchmark.yaml (locked in utils/dataset.lock), a baseline config, and the method whose paper's protocol fits
the benchmark, in that protocol. Nothing under hermit/ changes. Every run is the framework's own commands on a
config, as for any task: a baseline is a config for hermit eval alone (--adapter none, or an adapter directory: a
transfer, or AHE's seed as its template's directory), and a method is hermit train, then hermit eval --adapter final (and --adapter root for its seed or empty skill where no baseline config tests it). An eval's number is the
pass@1 that python -m hermit.harbor.report gives over the trials that are the agent's result (AlgoTune's harmonic
mean from utils/judge.py). The way in is examples/README.md#harbor-benchmarks:
what a machine needs (Docker, bubblewrap, Harbor 0.25.0 in its own venv, the CLI's sign-in), the commands, and a run
sheet of every run with its trials, each of which can go to another person.

Folder Tasks Baseline Method, in its paper's protocol
terminal_bench_2_0 89 terminal tasks, 1 h each the CLI with no adapter, each task's rollouts #3 and #4 (178 trials) AHE Adapter, the AHE paper's own protocol on this benchmark (ten iterations over every task twice, the best kept); its final adapter tested on #3 and #4
swebench_verified 500 issues no adapter, each issue once nothing trains: Terminal-Bench 2.0's final AHE adapter frozen, against AHE's seed, as the AHE and RRSI papers test a harness on SWE-bench Verified
algotune 154 speedup tasks no adapter, SkillOpt's 108 test tasks SkillOpt, its paper's protocol (split 2:1:7 with seed 42, 4 epochs, batch 40, minibatch 8, learning rate 4 to 2, strict gate, slow update, meta skill)
terminal_bench_science 70 science workflows, 8 h each no adapter, rollouts #3 and #4 (140) Terminal-Bench 2.0's AHE adapter frozen; AHE in Terminal-Bench 2.0's protocol
labbench 181 FigQA questions no adapter, SkillOpt's 127 test questions (and the 102 of them on a figure no training question has) SkillOpt, as for AlgoTune

Every config comes twice: Codex with GPT-5.6-Luna on a ChatGPT login and Claude Code with Claude Haiku 5.5 on a Claude
subscription, both at medium effort, acting and learning. Each README says why its method, with the paper's numbers,
compares its protocol with the paper's row by row, and has an empty results table.

Reworked on 11-16, with #105. #105 now leaves the framework as on main and keeps what Harbor needs in
hermit/harbor/ (its description). What that changes here:

  • No trial cache. trial_cache: true is gone from the five benchmark files. A resumed run or eval runs its trials
    again, and no text counts on a trial from an earlier run 8000 (the smokes' second eval from the cache, SWE-bench
    Verified's tokens of a cached trial).
  • An infra trial counts 0. eval.infra_retries is gone from the 18 configs that set it. Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's runner runs a trial
    that is not the agent's result again, twice, five minutes apart (agent.params.infra_retries, infra_wait_s; these
    configs had waited ten), training trials included, unless its cause does not run again (a host failure but its
    staging's, the disk gate's, a refusal of the run's configuration) or it is a session the provider could not
    serve, which these configs' logins run again under busy_retries instead; one still infra is a failed run, 0 in
    hermit eval's
    mean_score and among its errors. python -m hermit.harbor.report <eval dir> gives pass@1 over the scored trials,
    the infra ones counted apart, and AlgoTune's utils/judge.py and LAB-Bench's utils/figures.py read an eval's rows
    through it (an infra trial's row is now a judge_error one) and say, as it does, when an eval did not finish. The READMEs and the run sheet report that pass@1.
  • The baselines give the keys main's configuration asks of every config: data.train (the smoke split),
    template: prompt-only@1.0 and evolver: {name: eval-only}, placeholders that hermit eval reads but trains nothing
    with; no
    Evolver has that name, so hermit train refuses a baseline before any trial. They name the benchmark's task_info
    too, which hermit check asks of a config with a training split.
  • A lost sign-in ends the run (LoginFailed): there is no <jobs_dir>/HALT to remove. Sign in again and run the
    command again.
  • AHE's learners' clocks count a wait for the plan, as on main (the earlier Harbor foundation: every CLI in a task's container, through the existing commands and configs #105 started them with the CLI): a
    hold longer than a Debugger attempt's 600 s or the Evolve Agent's 7,200 s ends that session, and Terminal-Bench 2.0's
    README says what the step then keeps.
  • examples/conftest.py and examples/.gitignore do for the examples what Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's root conftest.py and
    .gitignore did (the root files are main's again): python -m pytest collects nothing under a run's runs/ or a
    prepared task set, and git ignores the task sets' links.
  • The texts follow: the five READMEs, the run sheet, the configs' comments, CHANGELOG.md and
    tests/core/test_harbor_examples.py, which now also builds Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's runner from every config's settings, its startup
    checks included (this machine's sign-in and bubblewrap stood in for), so a setting the runner refuses (a trial cache,
    a login for another CLI, no web_search) fails there.
  • Rebased on 11-17 with Harbor foundation: every CLI in a task's container, through the existing commands and configs #105 onto main's 616e818 (Add Hermes Agent as a CLI Base Agent (acting agent and hermes Evolver) #107, Hermes Agent): the same change as a5ca0d4, picked
    onto Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's new head without a conflict, then onto Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's thirteenth and fourteenth commits (6a79375,
    849f5a2), whose new refusals none of these configs meets (hermit check reports the same on all 26). Its texts name no Hermes run (a Harbor trial does not run Hermes Agent),
    and the AHE seed some configs test is the template's directory, Add Hermes Agent as a CLI Base Agent (acting agent and hermes Evolver) #107's version of it.
  • The audit of cb7184e found no high or medium issue and two low ones, in the run sheet's sentence on a lost
    sign-in, now fixed: a Codex learner that meets it fails its step only as AHE's Evolve session, while SkillOpt's
    optimizer skips a call that failed, as it skips any, so its step goes on without that call's edit (after the
    run's last trials its last slow update and meta skill then come out empty, with no error); and AHE's history
    can hold its first iteration twice only when the run stopped after that step's Evolver call began. The token
    sentence it asked about is Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's (docs/framework/task.md), fixed there.
  • The audit of d749198 found no high or medium issue and two low ones, now fixed: the run sheet's rule for an
    infra trial's runs again left out the causes that do not run again and the login's busy_retries
    (examples/README.md), and this description's list of what hermit check reports left out two warnings
    (Validation). For its questions, the run sheet now names a provider that does not bill the account (that ends
    the run) and a bubblewrap that cannot start the strict sandbox (refused at startup, as a missing one is), and
    LAB-Bench's README says that 15 of the new-figure questions share their figure with a validation question,
    whose output SkillOpt never reads. The disk gate's verdict it asked about is Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's, fixed there.
  • The audit of d647693 found no high or medium issue and two low ones, now fixed: hermit check of a Claude Code
    config, a baseline's too, needs claude on this machine (main's check of a login: claude run wants it on PATH,
    though hermit eval makes no such check: Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's candidate 7), which the run sheet now says; Terminal-Bench 2.0's
    protocol table gives the paper's 3,600 s sandbox lifetime (Table 4, the released code's e2b_sandbox_timeout), most
    likely the start's, the agent's and the tests' together, where these configs give the agent alone 3,600 s. Its nits:
    the run sheet says what hermit check warns of a SkillOpt config (the validation data given to the Evolver), what a
    Claude Code learner does on a lost sign-in, and that main's Claude warning describes a session on this machine;
    LAB-Bench's protocol table cites SkillOpt's code for task_description, not the paper; Terminal-Bench 2.0's says
    that allow_early_stop is Hermit's and the released max_iterations 100, and that Table 4 lists no effort for the
    Debugger. From its questions: RRSI's cost counts as Hermit's port does (about 61 x 178 if the incumbent ran again
    each round), and a run stopped in its first step starts over in its folder, as on main. With Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's eleventh commit:
    the run sheet says that busy_retries counts over all of a trial's runs, and the test stands in the runner's new
    startup check that bubblewrap starts the strict adapter sandbox.
  • The audit of 46162ec found no high or medium issue and four low ones, in the texts and the test's hygiene, now
    fixed: a stopped eval writes no row of the repeat it stopped in (the run sheet and AlgoTune's judge said its finished
    trials stayed in results.jsonl; Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's report said so too, fixed there); a finished eval handed back with its files'
    times changed read as unfinished (Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's report now reads the summary's content, never the files' times); the run
    sheet's trial counts say that AHE's runs count more when resumed mid-step, and that a trial on a login runs again
    after a plan refusal and up to busy_retries times when the provider could not serve it (a row's tokens are all its
    runs'); the test's unused import is gone. Its nits too: the run sheet says that a smoke's hermit check reports its
    shared rows and that LAB-Bench FigQA's smoke ran on the reworked core before its last review fixes, and Terminal-Bench
    2.0's README that AHE's own subprocess timeout is its Debugger's.
  • The rebuild's audit (of cc9759f) found no high or medium issue and three low ones, all in the texts, now fixed:
    every run needs bubblewrap, a baseline's --adapter none too, as the runner cannot tell a run that deploys none (the
    run sheet said only a run that deploys an adapter; Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's docs said so too, fixed there); AHE's config comments and
    the test said a learner waits out any plan hold, where AHE's clocks count the wait (they say so now, and
    Terminal-Bench-Science's README too); SWE-bench Verified's tokens recipe says that a trial the runner ran again holds
    all its runs' tokens. From its questions: the test runs Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's real startup checks on every config; the baselines'
    placeholders say that hermit eval reads them; the run sheet says that its trial counts leave out the runner's runs
    again, and that an eval a lost sign-in stopped writes no row of the repeat it stopped in (its finished trials are
    only in their job folders), beside the summary of the eval before, which the report and the two scripts now flag.
  • The audit of c7f0f25 before it: its three low findings, all in the texts, are fixed: the changelog names AHE's own
    training on Terminal-Bench-Science; SWE-bench Verified's image names; the configs' citations name the papers'
    versions the READMEs cite. Its questions are answered in the READMEs: the released code's limits of the tests and
    the start, what SkillOpt's analysts read of a LAB-Bench question, SWE-bench Verified's smoke as a command.

The PR is one commit, on #105's head.

Decisions:

  • The baseline is the same acting agent (CLI, model, login, effort) with no adapter, hermit eval --adapter none,
    on exactly the rows the method's final adapter is tested on. The method's starting point is tested on them too, so
    that what the start gives and what the search adds are read apart: --adapter root after the method's training
    (Terminal-Bench 2.0's AHE seed, SkillOpt's empty skill), or AHE's template's directory with the baseline's config on
    the benchmarks a transfer is tested on (SWE-bench Verified, Terminal-Bench-Science).
    tests/core/test_harbor_examples.py holds the configs to it.
  • Terminal-Bench 2.0's protocol. The AHE paper evolves and reports on all 89 tasks (k = 2 rollouts a task, ten
    iterations, the best by pass@1: in sample, its §4.1).
  • SWE-bench Verified keeps its instructions as Harbor publishes them: the issue as written, with no request to
    change /testbed.
    • With no adapter, Codex answered psf__requests-1142 in text and changed nothing (score 0). With AHE's seed, whose
      ADAPTER.md says to edit files and finish the work, it fixed it.
    • Kept as published, the numbers compare with Harbor's. The seed is the arm the transfer is read against (its README,
      Known limits).
  • AlgoTune scores a trial 1 - 1/speedup (utils/judge.py).
    • The mean m of those scores is 1 - 1/H for AlgoTune's harmonic mean H, so the Trainer's, SkillOpt's gate's and
      hermit eval's means move with AlgoTune's own score. SkillOpt's gate is its soft metric (a speedup has no pass).
    • The benchmark file gives the containers 64 GB (the reference's timing was killed at the tasks' 16 GB), thread pools
      of the task's 8 CPUs and no core files. It gives the verifier 7,200 s, a verifier timeout being the agent's result
      (verifier_timeout: agent).
    • SkillOpt's analysts and its slow update sort the rollouts by success. A success is a solver faster than the
      reference, as the verifier's own test has it (success_score: 0.000001). At SkillOpt's default of 1.0 no speedup
      would count, and every rollout went to the failure analyst.
  • LAB-Bench FigQA's download is patched (utils/patches.py, run by prepare on every download and recorded in the
    lock).
    • As published, each container saves the shuffle's seed in /app/.letter_mapping.json, where the agent reads it.
      The right choice is first before the shuffle, so replaying the shuffle gives the answer, in all 181 tasks. The
      patch drops the seed; the verifier reads only the letters.
    • The patch also removes the verifier's fallback that runs /app/setup.py, a file the agent can rewrite, when the
      mapping is missing. The mapping is always written before the agent starts, so a missing one now scores 0.
    • Harbor's oracle still scores 1. The patch changes no task unless it knows every file (refused otherwise).
    • The split is SkillOpt's, by question, and FigQA asks up to three questions about one figure. 25 of the 127 test
      questions share a figure with a training question, whose verifier output the learner reads. So
      utils/rows/test_new_figures.txt lists the other 102 (utils/figures.py), for a second score from the same
      trials.
  • SkillOpt's analysts get no Codex trace summary (codex_trace_to_optimizer: false, in both profiles' configs).
    The summary reads SkillOpt's own harness (task.md, SKILL.md, <answer>), and told the analyst that every Harbor
    rollout, right or wrong, gave no answer. SkillOpt's own Codex runs have it on; the protocol tables list it.
  • A learner waits for the plan. Every learner on a login waits for the plan's window with no limit of its own
    (plan_max_wait_s: null); trainer.call_timeout_min (a week) bounds a step, waits included, and AHE's learners' own
    clocks count the wait (above). tests/core/test_harbor_examples.py holds every config to it.
  • Smokes run each method on the benchmark's two smoke rows (<task>#0, which no other run takes), with a jobs
    directory of their own.
    • The AHE smokes set target_pass_rate: 1.01, so that the Debugger and the Evolve Agent run when both tasks pass.
    • The AlgoTune and Terminal-Bench-Science smokes cap a session at 1,800 s.

Files: the five folders under examples/; examples/README.md (the Harbor benchmarks section);
examples/conftest.py; examples/.gitignore; CHANGELOG.md; tests/core/test_harbor_examples.py;
examples/algotune/utils/tests/test_judge.py; examples/labbench/utils/tests/test_patches.py, test_figures.py.

This PR is stacked on #105 (base harbor-foundation); once #105 is merged it is retargeted to main.

Validation

All on one Linux host (Docker 29, bubblewrap, Harbor 0.25.0).

On this head d8496e4, on #105's head 849f5a2 (main at 616e818):

The earlier heads' runs (with #105's earlier runner: a trial cache, infra trials left out of the mean, HALT)

Their scores say the pipeline ran on those heads; the configs' settings are the same but for the rework's keys above.

  • c7f0f25 (on Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's 418a00d): the examples' tests 83 passed, the suite with Harbor foundation: every CLI in a task's container, through the existing commands and configs #105 1991 passed (the same 4
    failed); LAB-Bench FigQA's SkillOpt smoke in real containers (Codex 0.169.0 on the ChatGPT login, /tmp's gate at
    0.1 GB as it had 0.15 GB free): both epochs 1.0, the gate kept the starting skill, the final test 0.0 (on figqa-0001
    Codex wrote only the letter into /app/answer.txt, without the [ANSWER]X[/ANSWER] tags, and on figqa-0002 chose a
    wrong letter); 18 trials, no infra trial, no error. An eval with ${GH_TOKEN:-} in acting_agent.env was refused
    at its start.
  • dc4fe0e, b709e0c, 456e382, 6229196: the same tests and checks; the LAB-Bench smoke each time, 16 or 18
    trials, no infra trial, no error (final tests 0.5, 1.0, 1.0, 1.0); on 6229196 after dataset prepare downloaded
    the patched set anew (181 tasks, the same splits, the committed lock unchanged).
  • 3aa0cc2: test_harbor_examples.py's checks of the 11-15 rework failed on each of six broken copies (a
    baseline with a run: block, with a template, with a training split; a method config without its Evolver;
    SWE-bench Verified's baseline with a template, then with an Evolver); the LAB-Bench smoke: 18 trials, the final test
    0.5, no infra trial, no error.
  • f271051: LAB-Bench FigQA through its README's commands on the two smoke questions: the baseline 1.0, SkillOpt's
    training (both candidate skills rejected by the gate), its final test 1.0 and its start 1.0; 14 trials, no infra
    trial, no error.
  • b6cf47b, the version before the 11-15 rework:
    • Prepare, each benchmark from the registry, wrote the task links, tasks.jsonl, the splits and the locks
      committed here. LAB-Bench's lock records the patch (setup.py: 181 patched, 0 already patched; test.sh: 181 patched, 0 already patched, on a fresh download).

    • Oracle (Harbor's reference solutions, acting_agent: {name: oracle}, the two smoke rows): Terminal-Bench 2.0
      1.0, SWE-bench Verified 1.0, Terminal-Bench-Science 1.0, LAB-Bench 1.0 (with both patches), AlgoTune speedup 1x
      (the reference solver: score 0, the timing verifier ran).

    • Smokes (2 rows each):

      Benchmark Baseline (no adapter): Codex / Claude Code Method: Codex / Claude Code
      Terminal-Bench 2.0 0.5 / 1.0 AHE: 1.0 / 1.0, the Debugger and the Evolve Agent ran (450K / 840K tokens) and changed nothing, both tasks having passed
      SWE-bench Verified 0.5 / 1.0 (Codex answered psf__requests-1142 in text) transfer, the git archive export of Terminal-Bench 2.0's smoke: 1.0 / 1.0; AHE's seed as hermit/adapter/templates/ahe, Codex: 1.0
      AlgoTune H 1.56x (1 task of 2 sped up) / H 2.36x (2 of 2) SkillOpt: H 1.50x / H 2.07x, both steps' skills accepted in both, the success analyst run on the sped-up rollouts
      Terminal-Bench-Science 0 / 0 (one session ran out of the smoke's 1,800 s and was scored) AHE: 0 / 0.5; both steps at pass@1 0, so the final adapter is the seed; transfer, Codex: 0
      LAB-Bench FigQA 0.5 / 0.5; after the verifier patch, 1.0 / 0.5 SkillOpt: 1.0 / 1.0; the analysts' prompts carry no Codex trace summary

      No smoke had an infra trial or an error.

  • Each of those heads' secret scans (the committed files, the run records, the trial folders) found none of the two
    Claude tokens or the ChatGPT sign-in's tokens.

Not verified:

  • None of the full runs: the results tables are empty, and examples/README.md lists the runs.
  • This head's commands in real containers on the other four benchmarks and on Claude Code: their configs load, pass
    the tests and get only what is listed above from hermit check, and their earlier smokes ran (above).
  • A learner meeting a real plan hold.
  • An API key in place of a login, and the CLIs other than Codex and Claude Code.
  • Another host than this one.
  • SWE-bench Verified's 500 images on a small Docker disk: they accumulate in Docker's build cache, and the disk gate
    holds trials below 25 GB free.

Review

  • Tests and documentation cover the affected behavior, where applicable.
    • Tests: above.
    • Documentation: every folder has its README, examples/README.md the shared section, CHANGELOG the entry.
  • Commands, defaults, and public interfaces are consistent.
    • No interface changes.
    • The command forms the READMEs give: prepare; hermit eval --adapter none, with data.test= and a run name for
      a whole benchmark; hermit train, then hermit eval --adapter final and --adapter root; --adapter <a directory>; the adapter export; the oracle's command; python -m hermit.harbor.report and utils/figures.py on
      an eval's folder.
    • The LAB-Bench smoke ran hermit train and hermit eval --adapter final in real containers on cc9759f, a
      head before this one (Validation); on this head hermit check --no-probe reports on every config only what
      Validation lists; on the earlier heads every form ran on the smoke rows.
  • Shared logs and examples contain no credentials or private data.
    • The secret scans above.
    • runs/ and the task links are git-ignored.
  • Documentation-only: not applicable.

General checklist:

  • Core changes. None: no file under hermit/ changes.

  • Implementation correctness and failures. The configs go through the real entry points (hermit train,
    hermit eval) in the smokes, with their failure paths:

  • Real execution paths and tests.

  • Documentation. Five READMEs, five task-info/README.md (what the learners read: the task, the CLI, how the
    adapter is deployed; no answer or task-specific guidance), examples/README.md, CHANGELOG.

  • This description. Read against the files and the run records.

  • Independent review (post-PR audit): of this head d8496e4: no high or medium issue. An agent that did not
    write the PR (Opus 5.5, at max effort) audits it against the general, test and method checklists. Its two low
    findings, in the run sheet's texts, are not fixed in this head: examples/README.md says a subscription should not
    meet a refusal that ends the run, which a Codex plan that refuses every session until someone acts (a workspace's
    credits spent or its spend cap reached, a member's limit, a ChatGPT plan without Codex) now does (Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's
    fourteenth commit); and it says the Claude Code token is in no process's environment, where it is in neither the
    launch script's nor the CLI's (the exec's shell holds it a moment). Its questions: four AHE Codex configs set the
    learners' ChatGPT hosts that main's Trainer adds anyway, hermit check exits 1 on every config (main's
    budget warning), SkillOpt's skipped optimizer call after the last trials, LAB-Bench's letter shuffle seed kept
    only in Docker's log, and model_rejected counted among the infra trials in the report. The audits of cb7184e and d749198 found no high or medium issue; their low ones are fixed (Change), as
    are those of d647693, 46162ec, cc9759f and c7f0f25.

    The audits before

    Thirteen audits, of c780fde, f271051, 3aa0cc2, 6229196, 456e382, b709e0c, dc4fe0e, c7f0f25,
    cc9759f, 46162ec, d647693, d749198 and cb7184e, found no high issue. Their medium ones, each fixed:

    Their low ones, fixed or documented then and kept: the papers' statements (AHE's protocol, efforts, k, early stop and
    rollback; Meta-Harness's search; SkillOpt's authors; the arXiv versions); SWE-bench Verified's images and its smoke's
    own run and jobs directory; AlgoTune's success and its gate's noise; LAB-Bench's answer format, its verifier in the
    agent's container and its shared figures; bubblewrap for every run, a baseline's too; the host /tmp gate;
    the redaction of keys (not of a ChatGPT sign-in's tokens); SkillOpt's analysts without the Codex trace summary.

    Still open, disclosed in the READMEs: the agents' network is public in all five task sets as Harbor publishes them
    (whether to patch them offline is not decided); the verifiers of Terminal-Bench 2.0, SWE-bench Verified, AlgoTune
    and LAB-Bench run in the agent's container; trainer.call_timeout_min (a week) fails a step whose plan holds most of
    a week; SWE-bench's images accumulate in Docker's build cache.

Test checklist:

  • The tests are in tests/core/ (they read five examples' files: core runs for every change) and in the examples'
    own utils/tests/.
  • They are named as behaviours, and each file opens with what it covers.
  • They write only to tmp_path and use no network, sign-in or CLI. None skips: a config loads without its benchmark's
    download.

Method checklist:

  • The templates (ahe@1.0, prompt-only@1.0) and Evolvers (ahe_adapter, skillopt) are the existing ones, as
    main runs them.
  • The protocols' differences from the papers are each README's protocol table: the model; the acting agent being a
    CLI the adapter is deployed into; concurrency 6 against the AHE paper's 96; no Explore Agent; the port's rollback;
    the Evolve Agent's 7,200 s clock where the paper gives 500 turns; SkillOpt's starting skill a placeholder with no
    instructions, and its analysts without the Codex trace summary.
  • The learners see the training rows' trajectories and the task-info only, never the judge or the test rows.
  • Every config keeps the sandbox on (sandbox.enabled: true, enforce at its default required) and web_search: false for the acting agent and the learners.
  • No experiment is reported: the smokes check the pipeline.

Sandbox checklist: every process runs through #105's and main's paths (the learners in the evolver sandbox, the
acting agent in the task's container); this PR adds none.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

iamziyuzhao added a commit that referenced this pull request Nov 13, 2026
…AB's verifier and figures, tests)

The post-PR audit of #106 found no P1; its three P2s and its P2 question, fixed:

- AlgoTune's SkillOpt counted every rollout a failure: a trial's score, 1 - 1/speedup, never reaches SkillOpt's
  success_score of 1.0, so its analysts and slow update saw failures only. success_score is now 0.000001: a solver
  faster than the reference, as the verifier's own test has it.
- SkillOpt's Codex trace summary, on by default, describes SkillOpt's own harness (task.md, SKILL.md, <answer>) and
  told the analyst that every Harbor rollout gave no answer: codex_trace_to_optimizer: false in the SkillOpt configs.
- tests/core/test_harbor_examples.py now holds the configs to training and validation rows disjoint from the test's,
  the smoke's rows apart from the run's, the learners sandboxed, web search off, and SkillOpt's success and trace
  settings, and loads every config with no skip (neither tasks.jsonl nor skillopt is needed): each of 12 broken
  copies fails it.
- LAB-Bench's split is by question, and FigQA asks up to three questions about a figure: 25 of the 127 test questions
  share a figure with a training question. utils/rows/test_new_figures.txt (written by utils/figures.py) lists the
  other 102 for a second score from the same trials.

And its P3s. LAB-Bench's verifier ran /app/setup.py, the agent's to rewrite, when the mapping was missing: the patch
(now patches.py:patch_tasks) removes that fallback too, re-locked from a fresh download. The SWE oracle command gets
its own run name. The final adapt
8000
er's export goes to a fresh git-ignored folder per profile. The claims the audit
checked against the papers (Meta-Harness's leaderboard figures, AHE's rollback and efforts, RRSI's trials, GEPA's
splits, NPUEval's score, SkillOpt's meta skill) and the trial counts are corrected. The READMEs say how
Terminal-Bench 2.0's images are pulled, how infra trials count, and what the learners read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
@iamziyuzhao
iamziyuzhao force-pushed the harbor-benchmark-examples branch from b6cf47b to f271051 Compare November 15, 2026 09:30
@iamziyuzhao
iamziyuzhao force-pushed the harbor-benchmark-examples branch from f271051 to 4622bd6 Compare November 15, 2026 10:53
@iamziyuzhao
iamziyuzhao force-pushed the harbor-benchmark-examples branch from 4622bd6 to 3aa0cc2 Compare November 15, 2026 19:02
iamziyuzhao added a commit that referenced this pull request Nov 15, 2026
The post-PR audit of this PR's 2d9401c found one high issue and six medium ones, and the audit of #106's 3aa0cc2 one
medium issue in this PR's code; each is fixed here, and so are five of the low ones.

- Claude Code on Anthropic's own API with a key (`acting_agent: {cli: claude}`, `anthropic/<model>`, no login)
  started every session without a token: the launch script exported the plan's empty ANTHROPIC_API_KEY before
  ANTHROPIC_AUTH_TOKEN read the key from it. A variable the plan passes under another name is now set first, in one
  export that reads every source as Harbor passed it; a source no entry sets is unset, and the plan's own variables
  come after.
- A Harbor halt (a lost sign-in, an API account's usage limit) ends `hermit train` unfinished at the step that met it,
  before its learner (after the learner's call when a run of `run_agent`'s met it), and a resume runs that step again:
  before, every later rollout came back infra/halted while the learner went on, and the run ended as finished.
- Whether the provider could not serve a Codex session is read from its last failure since the session last worked,
  never from a warning of Codex's (the trust it gives a deployment's hooks), and a turn that failed, or a stream that
  ended, while Codex retried its requests is one it could not serve, unless the sign-in was lost: Codex 0.164 that
  cannot reach chatgpt.com fails its turn with `workspace routing discovery failed`, which the last-failure rule had
  made the agent's empty answer. Codex 0.164's own words for a lost sign-in are matched.
- A ChatGPT sign-in a session hands back replaces the shared copy only as a later, well-formed refresh: a regular file
  of at most 64 KiB (a container's larger one is never downloaded) holding its refresh and access tokens, for the
  copy's account, stamped after the copy and at most a minute ahead of this machine's clock (an hour where the clock
  may differ). Harbor no longer gets CODEX_FORCE_AUTH_JSON or CODEX_AUTH_JSON_PATH from the user's environment.
- Only a pipeline that keeps its trials by row (a Harbor task set with `trial_cache` on, in the config or its benchmark
  file: isolate.keeps_trials) is handed rows naming their epoch or asking for a new run; no record keeps `epoch` or
  `fresh` (rollout.TRIAL_KEYS), so the learning material's `input` and every learner's text of a task are the same in
  each epoch, and the adapter's per-task context gets the task's own row.
- A Harbor trial is scored as Harbor grades it: a verifier that left no reward Harbor could read or ran out of its time
  (`verifier_timeout: agent`, now the default; `infra` the opt-in for a host whose load makes verifiers time out), and
  a request of one of Harbor's own agents that the provider refused for what it held, are the agent's result, 0
  without a reward, unless the verifier's output shows its tools never arrived or the host's disk full; a provider
  that could not serve, or refused the run's configuration, stays infra (Hermit runs it again, where Harbor grades it).
  An OSError on this machine while the adapter is staged is infra (`staging_failed`); the adapter's own deployment or
  per-task context failing stays the agent's 0, since what its child process prints could be the adapter's words. A
  verdict that quotes the verifier's output applies `verifier_redact`.
- `dataset prepare`: a patched set is its patch's own. The download record names the patch (its hook and its file's
  digest), a reuse of another source's or another patch's tasks is refused before the patch runs, the default data
  directory is named by the patch too (an unpatched set's name as before), and a download is patched in its own
  folder before it is moved into place.
- The AHE Adapter's learners' clocks (`evolve_timeout_s`, the Agent Debugger's `timeout_s`) are the Base Agent's own,
  counted from the CLI's start: a wait for the login's plan or a session slot pauses them instead of spending them (a
  hold longer than a clock made the step a no-op recorded as done, or the Debugger's analyses upstream's fallback
  text). This reverses PR #65's choice that the Debugger's clock cover the plan wait: upstream's clocks had no plan
  hold to cover. `trainer.call_timeout_min` still bounds a step, waits included.
- `hermit train`'s refusal of more than one epoch over a multi-step task's steps gives its true reason.

Tests: test_harbor_harborside.py (every CLI's launch script on every backend run by bash, the returned files' limits),
test_harbor_runner.py (grading as Harbor does, staging, redaction, the sign-in back by the environment's clock,
Harbor's environment, a Codex outage), test_harbor_core.py (the rows only a trial cache is handed, the records, a
halt), test_harbor_dataset.py (patched sets), test_cli_agent.py and test_base_agents.py (Codex's outcome and lost
sign-in words, the take-back), tests/methods/ahe (both clocks through a real login path).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
@iamziyuzhao
iamziyuzhao force-pushed the harbor-benchmark-examples branch 6 times, most recently from c7f0f25 to d647693 Compare November 17, 2026 02:09
iamziyuzhao and others added 13 commits November 17, 2026 08:01
…as Hermit's own sessions are

What the Harbor runner needs of the layers every method shares, so that a trial in a task's container is one more
session of the CLI's Base Agent:

- The hosts deploy for a caller that serves the adapter's tools itself (`--no-serve-tools` on every host; Pi's and
  dsh's `prepare(serve_tools=False)` names no server, and the acting agents' workspace now passes the flag on, so a
  container session of Hermit's own runs gets no server row it cannot start) and take one task's context
  (`--context-file`).
- Every CLI Base Agent reads a stream its caller read elsewhere: `outcome()` with no stream file reads the stream's
  text as it reads the file, the reply included; a missing or empty stream is a session not served, never a TypeError.
- A Codex session whose sign-in or key the provider refused is `login_failed` (the run stops) if its turn did not
  complete, read from its own notices: never one it recovered from, what its log quotes of the session's tool calls,
  or an event's text (U+0085, U+2028 and U+2029 end no line of a stream); `unavailable` comes from its last failure.
  Codex's records are read with span prefixes too (`RUST_LOG=codex_core=info`).
- hermit.agent.base.trajectory, the AHE Debugger, Harness²'s bench, RRSI's render and SkillOpt's Codex trace read a
  Harbor trial of any CLI (`agent/agent-<backend>.jsonl`, then Harbor's own output files, then its ATIF trajectory,
  which the Debugger takes before those files), and AHE's texts (EVOLVER.md's too) name that trial's files (the
  stream, hook audit and state under agent/; the record's instruction, as the Debugger's `task0i.md`; START.md's
  tree). Harness²'s bench takes a Claude Code trial's final message as the Base Agent reads its reply. MWM counts a
  learner session's turns and actions from the events the common reader reads (a line of the CLI's own that is no
  JSON object, or an event holding U+2028, no longer fails the step) and finds a task's record by the material's own
  file name.
- A Harbor acting agent's model is bound and checked in the acting CLI's dialect (`agent (harbor, <cli>)`, an
  endpoint's too), the whole Binding spec kept, developer_role included, and its login is a contained session's
  (logins_of) unless `claude_bin` names this machine's Claude Code, whose version is then checked; the task set's
  benchmark file counts for both, as the runner merges it (relative to `normalize_config`'s `base`, else the working
  directory). hermit.harbor.clis is the table of those CLIs.
- A client of a CLI's chat endpoint counts what a session that failed or that the provider refused used, which the
  endpoint reports in its error body (ChatClient's `count_error_usage`, set by `endpoint_spec`).

tests/selection.py counts the recorded OpenCode and dsh streams as shared: the methods' tests read them too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
…k's steps in order

What a Harbor task set needs of the framework's own commands and configuration. There is no new way to run: training
is `hermit train`, testing is `hermit eval --adapter ...`, each set by the run's YAML and overrides as before.

- A run that is not the agent's result (`RunOutput.extra["unscored"]`: a Harbor trial of status infra) has status
  `infra`: never judged, its score null in steps.jsonl, left out of the Trainer's and `hermit eval`'s means and
  counted (`unscored`, in the summaries, the learning material and the card). `eval.infra_retries` and
  `eval.infra_wait_s` make `hermit eval` run such rows again, except a multi-step task's step rows, a task Harbor runs
  for none of Hermit's agents (`unsupported_task`) and any after a halt (a lost login, a usage limit).
- `hermit eval` needs only what it reads (`data.tasks`, `data.test`, the agent, the judge): a config with no
  `data.train`, such as a baseline's, needs no template or Evolver; `hermit check` checks it as `eval` runs it (its
  probe on a test row), `hermit train` refuses it, and its run name is the config file's when `trainer.run_name` gives
  none. An adapter of the run's tree (`final`, `root`, a tag, a commit) needs that tree: without one, `eval` refuses it
  before any run. The `eval` section is checked where an eval runs.
- With `eval.repeats` above 1, each repeat hands the pipeline copies of its rows that name it (`repeat`), so that a
  pipeline that keeps its trials by row (Harbor's trial cache) runs each repeat anew; results.jsonl names the repeat.
  With `trainer.epochs` above 1 each epoch's rows name the epoch (`epoch`), and the rows `run_agent` runs, and those of
  a task the epoch's order names twice, ask for a new run (`fresh`): such a pipeline runs each anew, an epoch on an
  adapter the one before left unchanged included, where it would have handed back the earlier trial.
- A multi-step Harbor task's steps run in order in its stream: `data.shuffle` moves its rows as one; a split whose
  order is kept (the train split with `data.shuffle: false`, the test split, the validation split) that lists a step
  ahead of an earlier one, or without every earlier one, is refused before any run, and `hermit check` reports it;
  `next_tasks` may name a step only after the earlier ones; `run_agent` runs no training row that is such a step, and
  an id it does not run comes back as an error result (score 0), no longer an exception; Harness² fails such a step
  before any editor session, and records an infra execution's cause beside its null score. A run runs each step of a
  stream once, in one environment: a train split with such steps trains one epoch (`hermit train` refuses more, and
  `hermit check` reports it). `hermit check` checks the test split's order for a training config too, and its probe
  runs no later step.
- The Harbor task set's tasks and jobs directories, and an eval config's tree, are run secrets. The Harbor agent is
  told what its streams are named for (`run_identity`: a training run's record directory and the id it keeps there,
  any other pipeline its own), whether they are kept for a resume (`keep_streams`: the Trainer's pipeline only, until
  the run finishes), the run its trials are kept to (`trial_scope`: the Trainer's pipeline only, that identity),
  whether the run deploys adapters, and the CLI and login of a model only a CLI reaches; `hermit check`'s probe takes
  no trial from the trial cache.
- An acting agent of Harbor's own takes no adapter: `hermit train` refuses it, `hermit eval` runs it with
  `--adapter none` only, and `hermit check` reports it for a training config.

tests/core/test_harbor_core.py covers these. What this commit hands the Harbor agent, the next commit's runner takes:
three of these tests (Harbor's `dataset prepare`, and a pipeline closing its HarborAgent with its streams) pass from
there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
…the adapter's tools, context and notes

A Harbor trial ran only Codex well (and Claude Code through code of its own); the adapter's tools, a per-task context
and an adapter's notes never reached the container, and infra trials counted as zeros. Now:

- One HermitXXX class per CLI (hermit.harbor.clis: codex, claude, pi, opencode, dsh, mini-swe-agent) over one executor
  (harborside/hermit.py). Hermit's side renders each trial's session with the CLI's own Base Agent
  (hermit.harbor.launch: the home, the command, the environment; host paths made the container's) against the adapter
  deployed as `hermit deploy` lays it out, and harborside uploads and runs it as the task's agent user: the prompt on
  stdin, the stream in agent/agent-<backend>.jsonl, the deployment record always there (so an adapter's hooks run on
  Codex too, HERMIT_HOOK_LOGS set), a session still running at Harbor's timeout killed with its process group. The
  steps after the session still run past that timeout, and keep the session's own error when the timeout lands in
  them; a copy that failed is dropped, never kept in part. A `<cli>_bin` serves only at the asked-for version and when
  the agent user may execute it. The runner reads the stream back with the same Base Agent: reply, served, the plan's
  or the provider's refusal, the usage at `agent.params.price`, else at the backend's price.
- The adapter's tools are served from this machine on the Docker bridge's gateway (hermit.harbor.tools, every call
  logged); a per-task context is computed in the adapter sandbox (hermit.harbor.context); an adapter's notes come back
  after the session (memory/ in the log).
- A key or a token reaches the container by its variable's name only (`docker compose exec -e NAME`; Claude Code's
  subscription token on a descriptor), never in a command line, a file, the plan or a log; Codex's ChatGPT sign-in is
  a file of its home there (mode 600). Codex and Claude Code run on the user's subscription
  (`login: chatgpt | claude`) in the plan's slots and holds, each trial noting the plan's usage (so `MAX_USED` holds
  trials back): a refused session again after the window, one the provider could not serve after a pause unless it
  ran out of the agent's time, a lost sign-in never, none once another trial halted the run; the trial's usage is
  every run's. Codex's refreshed sign-in comes back and becomes the shared copy. A task whose agent network is not
  public gets the model's and tools' hosts allowlisted and web search off; `web_search` must be set.
- The answer-only agent (`cli: answer`) makes one model call through an endpoint the runner serves and writes the
  answer into the container (LAB-Bench's questions); a request still in flight when the trial ends is given up, its
  cost unknown, and on a model a CLI reaches on a login the trial waits for that plan first (a request the plan held
  past the agent's time is infra, `usage_limit`). A question or attachments it cannot read fail the launch.
- The judge scores the verifier's reward whenever the verifier gave one, a timeout or an agent error included
  (Harbor's own mean), says "passed" at `pass_reward` (null for a score scale) and leaves out what `verifier_redact`
  matches. Not the agent's result, so unscored (infra): a verifier whose tools never downloaded or that hit a full
  disk, harborside's launch failing (HermitLaunchError, the CLI's install included), a session that never started or
  whose tools never came up, a lost sign-in, a Claude Code, Pi or OpenCode session or an answer request the provider
  refused for the run's configuration before serving any (its key, model, bill or a setting it does not take:
  `model_rejected`, no halt), a task Harbor runs for none of Hermit's agents (MCP servers, a skills folder, a Windows
  container: `unsupported_task`, never handed to Harbor; the set's other tasks run). A trial out of the agent's time
  is the agent's even after a provider notice, and so is a request refused for its input; the adapter's context over
  the CLI's limit beside the image's own is the adapter's 0, and so is a session the model's safeguards ended. With
  `verifier_timeout: agent` (a verifier that times the agent's solution, as AlgoTune's does) a verifier out of its
  time is the agent's result, and Continual Harness's Refiner reads it as that, not as a session past its clock.
- Startup refuses what every trial would: a login for another CLI, a login and a binding at once, a loopback model, a
  missing key or sign-in, a non-Docker environment for secrets by name, a plan the Base Agent cannot render
  (mini-swe-agent's: web search, a model class Hermit does not read), a `harbor` that is no executable file,
  mini-swe-agent without its package for a run that deploys adapters, the answer agent's attachments on a model a CLI
  reaches. Harbor's own claude-code gets a bound model's Messages API root (it was sent to /v1/v1/messages), keeps
  Harbor's per-task web rule unless `web_search` is false, and is r
10000
efused the subscription (`CLAUDE_FORCE_OAUTH`, or
  the subscription's token as its only sign-in).
- `python -m hermit.harbor.dataset prepare` makes an example's data from its benchmark file's `dataset:` block (the
  registry's tasks, rows, splits, smoke rows, a patch, the images' sizes with `image_sizes: true`, a lock). A download
  is moved into place only once whole, and what is in its way is refused first; a relative `data:` is the benchmark
  file's folder's. The lock and the download record the tasks' source (a download of another source is never reused,
  and the default data directory is the source's own); the lock holds no path of this machine and hashes only a mode's
  executable bit (one written under a umask other than 022 needs writing again); an unreadable lock is refused unless
  `--force`.
- Also, from the Terminal-Bench 2.1 runs: a host failure (Docker's, the host's /tmp full) is infra and no trial starts
  while /tmp is short; the trial of a task whose name is longer than 32 characters is found; a `harbor run` past its
  wait budget is killed and its trial's compose projects, the verifier's too, taken down by name alone (no compose
  file or `COMPOSE_*` variable read). A stream's step runs its own plan, its verifier read as a trial's; each `hermit
  eval` repeat and each run gets streams of its own, stopped when the run ends unless a `hermit train` may resume
  them. The trial cache keys the launch, the whole row, the task's files, the model's price and the adapter as
  deployed (a file's executable bit, not the bits a umask sets; not the adapter's card, which no deployment copies, so
  a final adapter tested again meets its trials); a cached trial costs nothing again; a training run's trials are its
  own (only the run, resumed, meets them) and each epoch's too, a row asking for a new run (run_agent's, a task a
  split names twice) is neither taken nor kept, and `hermit check`'s probe neither takes one nor keeps one. The
  benchmark file's price applies to its own model, and a model the config gives as an endpoint mapping keeps its own
  price.
- OfficeQA's Harbor judge reads the final message from HermitCodex's stream (`agent-codex.jsonl`): a task set built
  before needs building again.
- Docs and CHANGELOG for the whole change (the framework's task, configuration and command pages; the methods' pages;
  the Breaking entries: the runner's `codex_login` is gone, `login: chatgpt`; a table CLI's trial needs `web_search`;
  secrets by name run on local Docker only).

Checked in real containers on this machine, each run a `hermit eval` of a config for it alone: Codex on the ChatGPT
login (no adapter; tasks with an open and a closed network; the adapter's MCP tool, AHE's hooks, Continual Harness's
notes, ASPIRE's template) and Claude Code on a subscription token (an instruction that begins with `/`, the MCP tool,
AHE's hooks); Pi, OpenCode, dsh and mini-swe-agent on a scripted model; the answer agent; a three-step stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's 2d9401c found one high issue and six medium ones, and the audit of #106's 3aa0cc2 one
medium issue in this PR's code; each is fixed here, and so are five of the low ones.

- Claude Code on Anthropic's own API with a key (`acting_agent: {cli: claude}`, `anthropic/<model>`, no login)
  started every session without a token: the launch script exported the plan's empty ANTHROPIC_API_KEY before
  ANTHROPIC_AUTH_TOKEN read the key from it. A variable the plan passes under another name is now set first, in one
  export that reads every source as Harbor passed it; a source no entry sets is unset, and the plan's own variables
  come after.
- A Harbor halt (a lost sign-in, an API account's usage limit) ends `hermit train` unfinished at the step that met it,
  before its learner (after the learner's call when a run of `run_agent`'s met it), and a resume runs that step again:
  before, every later rollout came back infra/halted while the learner went on, and the run ended as finished.
- Whether the provider could not serve a Codex session is read from its last failure since the session last worked,
  never from a warning of Codex's (the trust it gives a deployment's hooks), and a turn that failed, or a stream that
  ended, while Codex retried its requests is one it could not serve, unless the sign-in was lost: Codex 0.164 that
  cannot reach chatgpt.com fails its turn with `workspace routing discovery failed`, which the last-failure rule had
  made the agent's empty answer. Codex 0.164's own words for a lost sign-in are matched.
- A ChatGPT sign-in a session hands back replaces the shared copy only as a later, well-formed refresh: a regular file
  of at most 64 KiB (a container's larger one is never downloaded) holding its refresh and access tokens, for the
  copy's account, stamped after the copy and at most a minute ahead of this machine's clock (an hour where the clock
  may differ). Harbor no longer gets CODEX_FORCE_AUTH_JSON or CODEX_AUTH_JSON_PATH from the user's environment.
- Only a pipeline that keeps its trials by row (a Harbor task set with `trial_cache` on, in the config or its benchmark
  file: isolate.keeps_trials) is handed rows naming their epoch or asking for a new run; no record keeps `epoch` or
  `fresh` (rollout.TRIAL_KEYS), so the learning material's `input` and every learner's text of a task are the same in
  each epoch, and the adapter's per-task context gets the task's own row.
- A Harbor trial is scored as Harbor grades it: a verifier that left no reward Harbor could read or ran out of its time
  (`verifier_timeout: agent`, now the default; `infra` the opt-in for a host whose load makes verifiers time out), and
  a request of one of Harbor's own agents that the provider refused for what it held, are the agent's result, 0
  without a reward, unless the verifier's output shows its tools never arrived or the host's disk full; a provider
  that could not serve, or refused the run's configuration, stays infra (Hermit runs it again, where Harbor grades it).
  An OSError on this machine while the adapter is staged is infra (`staging_failed`); the adapter's own deployment or
  per-task context failing stays the agent's 0, since what its child process prints could be the adapter's words. A
  verdict that quotes the verifier's output applies `verifier_redact`.
- `dataset prepare`: a patched set is its patch's own. The download record names the patch (its hook and its file's
  digest), a reuse of another source's or another patch's tasks is refused before the patch runs, the default data
  directory is named by the patch too (an unpatched set's name as before), and a download is patched in its own
  folder before it is moved into place.
- The AHE Adapter's learners' clocks (`evolve_timeout_s`, the Agent Debugger's `timeout_s`) are the Base Agent's own,
  counted from the CLI's start: a wait for the login's plan or a session slot pauses them instead of spending them (a
  hold longer than a clock made the step a no-op recorded as done, or the Debugger's analyses upstream's fallback
  text). This reverses PR #65's choice that the Debugger's clock cover the plan wait: upstream's clocks had no plan
  hold to cover. `trainer.call_timeout_min` still bounds a step, waits included.
- `hermit train`'s refusal of more than one epoch over a multi-step task's steps gives its true reason.

Tests: test_harbor_harborside.py (every CLI's launch script on every backend run by bash, the returned files' limits),
test_harbor_runner.py (grading as Harbor does, staging, redaction, the sign-in back by the environment's clock,
Harbor's environment, a Codex outage), test_harbor_core.py (the rows only a trial cache is handed, the records, a
halt), test_harbor_dataset.py (patched sets), test_cli_agent.py and test_base_agents.py (Codex's outcome and lost
sign-in words, the take-back), tests/methods/ahe (both clocks through a real login path).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's fe8c5b4 found two medium issues and eleven low ones; each is fixed here.

- A step of a multi-step task whose turn cannot come ends infra (stream_order) at once and starts no driver: its
  stream's driver waits for a step no rollout of the runner is running (one that ended before it reached the driver,
  or ran in an earlier training step), or the stream has no driver and no rollout of its first step is running to
  start one. Every later step of the stream ends the same way, and the last of them stops the driver. Before, each
  waited out its turn (by default its budget for each earlier step and an hour more), holding a rollout's worker, then
  ended infra, so a step that failed on this machine before it reached the driver, a halt (whose resume reran a later
  step on a new driver at step 1) or a driver gone lost the rest of the stream after hours. The runner keeps each
  stream's steps in flight; StreamClient.wait_turn takes what it asks.
- `trial_cache` with an answer agent on a model a CLI reaches (`model: {cli, model, login}`): the trial's key held the
  URL of the endpoint the run's pipeline serves the model on (its port and token, and the binding's `messages_url`
  derived from it), which no resumed run or other eval has again, so no trial was ever taken from the cache. The key
  names that model by its CLI and login.
- A new stream driver in a directory that held one sets the earlier one's trial and replies aside (`earlier/<n>/`):
  Harbor reuses a trial's step directories, so a step of a stream run again that left no output of its own was read,
  and billed, as the earlier run's.
- A stream driver that answers no stop within 15 minutes (hung in a step) is killed with its process group, and its
  trial's compose projects are taken down by name.
- An OSError on this machine while a trial's job and launch are written (its job directory, the launch plan, the
  agent's config, job.yaml), or a stream step's launch plan, is infra (`staging_failed`), as one while the adapter is
  staged is: before, it raised out of the rollout, the agent's 0.
- A rollout that never reached a container (a halted run's, the disk gate's, an unsupported task's, a staging that
  failed, a stream step its driver was never asked for) costs 0: before, its cost was unknown, which left the eval's
  total cost unknown. A stream step lost after its request was sent keeps an unknown cost.
- The ChatGPT sign-in's take-back reads the shared copy's own stamp as any accepted copy may hold it (at most an hour
  ahead of this machine's clock, as one from the user's own file), never as no stamp: an earlier file a session
  handed back replaced a copy stamped ahead of this clock.
- Codex's fall back from WebSockets to HTTPS retries nothing, so a request refused after it is the session's own
  failure; only its reconnects (`Reconnecting...`) are retries.
- `hermit eval` of a split that names a task twice keeps a row for each, as on main (the infra reruns kept the records
  by id).
- `<jobs_dir>/HALT` names the record's cause first (`login_failed`, `usage_limit`) and says that it halts every run on
  that jobs directory, as the docs now do.
- The docs: a sign-in file is checked for its size before it is downloaded (one grown after the check is refused when
  taken back); with Harbor's retry on, a failed attempt's usage is not counted; what `staging_failed` covers. The
  CHANGELOG's Harbor entry is rewrapped where earlier edits had cut its lines short.

Tests: test_harbor_runner.py (a stream's lost turns, at once and in order, a halt's resume, a rerun's outputs, a hung
driver, a stream step's launch, a lost step's cost, the CLI model's trial key, a trial's staging, a never-ran
rollout's cost, the halt file), test_harbor_core.py (a split that names a task twice), test_cli_agent.py (a copy
stamped ahead of this clock), test_base_agents.py (Codex's fall back).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's 3a49adc found three medium issues and fifteen low ones; each is fixed here or, where
it is a limit of the design, recorded in the PR.

- `trial_cache` with a model a CLI reaches: 3a49adc named that model by its CLI and login alone, so a second eval on
  the same jobs directory whose CLI had another effort, `bin` or version met the first one's trials. The key also
  holds the CLI's identity (`hermit.agent.base.endpoint.cli_identity`: its settings as its sessions get them, less
  where they run and log and which plan they wait for, and its binary's path, size and time of change), as a digest
  that hermit.isolate.agent_pipeline hands the runner (`model_cli_identity`). Harbor's `retry`, the adapter
  sandbox's `sandbox_enforce` and `tools_host` are in the key too.
- A trial whose agent ran out of its time or exited with an error is verified by Harbor and graded: when its
  verifier's tools then never arrived (a 5xx of GitHub's release download) or met the host's full disk, it is infra
  and run again, as one whose agent finished is. Before, it was the agent's 0 and stayed in the trial cache.
- Codex's words for a refresh of the ChatGPT sign-in the provider refused ("Your access token could not be refreshed
  [because your refresh token was already used / has expired / was revoked]. Please log out and sign in again.")
  are a lost sign-in: the run halts. Before, the trial kept Harbor's verdict, scored 0 and cached. A sign-in refusal
  counts only since the session last worked: one on a side request the session worked after is none.
- `run_tasks` submits each multi-step task's steps in step order, in the places its steps had: a `run_agent` call
  that listed a later step first, with fewer workers than the gap, gave the stream up and lost the earlier step too.
- A step whose stream aborted before its turn is never asked for (`wait_turn` checks the abort first), so it costs 0;
  and a trial whose environment or agent setup failed before its agent started (Harbor records no
  `agent_execution`) costs 0. Both had an unknown cost, which left the eval's total cost unknown.
- An OSError on this machine past the guarded steps (no process left to start `harbor`, a file it cannot write or
  read) is infra (`host_failed`), its cost unknown, not the agent's error scored 0. A trial cache this machine cannot
  write leaves the trial as it ended (it stands, uncached), an entry it cannot read is no trial kept, a key whose dry
  render cannot be written runs the trial without the cache, a sign-in take-back that fails leaves the trial as it
  ended, and a HALT file it cannot write leaves the halt to the rollout's output.
- A stream step run again sets the tool-call log an earlier run of it left aside (`earlier-<n>-tool-calls.jsonl`) at
  its turn, so its curated log holds its own calls only.
- A killed stream driver's socket is removed.
- Only a Harbor task set's rows name their repeat (`repeat`, with `eval.repeats` above 1), and no record's `input`
  keeps it; a record's `input` drops only the keys its caller added (the Trainer's `epoch` and `fresh`), so a row's
  own field of those names stays. Every other pipeline gets its rows and records as on main, and a Harbor adapter's
  per-task context never reads `repeat`.
- A failed `hermit eval` removes the earlier eval's `summary.json`, as it empties `results.jsonl`.
- The overlap error of a declared path names a Harbor task set's directories as such.
- The docs: `solved_once` counts each test id once; the steps of `run_agent`'s call run in step order; the cost of a
  trial that never started an agent; `host_failed`; the Codex refresh refusal and what to do about it; a copy stamped
  ahead by another clock is replaced once this clock passes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's e7ace26 found no high or medium issue and eleven groups of low ones; the audit of the
benchmarks PR stacked on it (b709e0c) found a medium issue here and a low one. Each is fixed here or, where it is a
limit of the design, recorded in the PR.

- `python -m pytest` imported the files of a run's folder beside an example's configs (`examples/*/runs`, their
  output_dir), a task container's and a learner's files among them, and ran them on this machine outside any
  sandbox: the root conftest ignores them, as it ignores a Harbor task set's.
- A pipeline that deploys adapters is refused at startup where bubblewrap is not installed and the adapter sandbox
  that renders each adapter is required (`agent.params.sandbox_enforce`): each trial ended in the sandbox's error,
  scored 0.
- A rollout that met a halt (a lost sign-in, an account's limit) and then an OSError of this machine (its curated log
  not written: a full disk) came back `host_failed` with no halt, so that nothing halted where its HALT file could
  not be written either: it keeps the halting verdict. A jobs directory this machine cannot make is `host_failed` at
  a cost of 0, not an error scored 0.
- A stream step whose turn never came curated the tool-call log an earlier run of it left as its own: it curates none.
- A verifier's words of a full disk (ENOSPC) made a trial infra even after its tests ran: now only before its tests
  wrote a report (`ctrf.json`), so that a test's own output (an agent's program, a task about a full disk) stays the
  agent's result.
- The copy-back and the collect ran as root in /logs/agent, which every user can write in, through a link the agent's
  user could put there, and made what it named readable to all: each makes a new folder of root's, enters it, checks
  that it is that folder, and works in it by relative names.
- `acting_agent.env` is written into each trial's job and onto `docker compose exec`'s command line: a variable of a
  secret's name, or a value naming one, is refused at startup.
- The `tasks` link is followed once (`tasks_dir`), so that a prepare pointing it elsewhere mid-run changes neither a
  trial's task set nor the key it is kept under; a task's link to a folder is in its digest by where it points.
- A codex, claude or pi trial of a model a CLI reaches got the loopback refusal once the pipeline served that model:
  it is refused for what it is.
- A row of its own `epoch`, `fresh` or `repeat` field is refused where the framework adds those keys (hermit train
  with the trial cache, hermit eval's repeats of a Harbor task set; hermit check says so too): they would replace it,
  and no record would keep it.
- `dataset prepare`: a data directory that is the set's own folder in another download is that download's (its
  marker is beside it), refused to a benchmark of another patch; a download is marked in its own folder before the
  set is moved into place; an image whose size cannot be read anew keeps the earlier one; split counts are whole
  numbers, and a smoke task is named once; the rows, the lock, the splits and the sizes are all made before any is
  written, so that a refusal leaves the link and every file as they were; a `data` naming a variable that is not set
  is refused; this machine's errors (an OSError, Harbor's failed download) are the command's `error:`, exit 1.
- An ATIF trajectory's tool-call id that is no string (a list, an object) reads as no id, never a TypeError in each
  learner reading the log.
- Tests: a trial-cache key this machine cannot make, a sign-in take-back that fails, MWM's name of a task's record.
- The docs: a command a CLI ran in a session of its own (Claude Code's shell tool) is outside the process group the
  kill reaches; a `timeout` or an `agent_error` scores 0 when its verifier left no reward.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's b9a3d61 found no high or medium issue and four groups of low ones. Each is fixed
here; its questions are recorded in the PR.

- A `hermit eval` refused at its start (a row of its own reserved key, or a pipeline whose startup checks refuse it:
  no bubblewrap, a secret in its env) had already emptied the earlier eval's results.jsonl and removed its
  summary.json: the eval empties them once its pipeline and judge are built, as on `main`, and a refused start leaves
  them as they were. One that fails after its start still leaves no earlier summary.
- `acting_agent.env`'s secrets are read as Harbor fills its values: `${NAME:-default}`, which Harbor fills in from
  this process's environment, is refused like `${NAME}` (it got through), and a referenced name is a secret's by the
  rule the variable's own name is (`launch.SECRET_VAR`), so that a setting named like one
  (`${TOKENIZERS_PARALLELISM}`) is no longer refused. `$NAME`, which Harbor hands on as that text, is still refused
  where it names a secret, as it never passes the secret the config meant.
- `hermit check` refuses a test row's own `repeat` wherever `hermit eval` of the config would (a training config's
  eval too), by eval's own rule (`_harbor_rows`), and a test now covers it.
- Tests: an unused fixture, a temporary directory outside the test's own `tmp_path`, blank lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
Everything in hermit/ outside hermit/harbor/ is back at main (e813538):
the three agent layers, the Trainer, hermit eval, hermit check, the
configuration, the sandbox, the methods and the hosts, but one change.
Pi's and dsh's prepare take serve_tools, as the other four hosts
already do, so that a trial gets the adapter's tools from the runner.
hermit/harbor/FRAMEWORK_SUPPORT.md lists where each of Harbor's needs
now lives, and what could later become framework support.

What a Harbor task set now meets:
- A trial that is not the agent's result (infra) runs again in the
  runner (agent.params.infra_retries, 2; infra_wait_s, 300 s). One
  still infra is refused by the judge, so the run records a failed run
  (judge_error): hermit eval counts it among its errors and as 0 in its
  mean. python -m hermit.harbor.report gives pass@1 over the trials
  that are the agent's result.
- A lost sign-in, or an API account's usage limit, raises LoginFailed,
  which ends hermit train and hermit eval as a local session's does.
  There is no HALT file.
- There is no trial cache; agent.params.trial_cache is refused.
- A multi-step task's stream is the runner process's own and is never
  resumed; a split keeps its steps in order (data.shuffle: false).
- A Codex trial's lost sign-in and provider outage are read in
  hermit/harbor/signin.py (the outage by the session's last failure, so
  a reconnect Codex recovered from is no outage).
- The answer agent's model that only a CLI reaches is given in the
  benchmark file; a run config's own is refused at startup.
- A trial's log keeps the CLI's stream, task.md, prompt.txt,
  last_message.txt and the hook files at its top, where the methods
  read a local session's.

Fixes of the last audit (of 418a00d): a stream's step gets the sign-in
at its turn, not when its rollout began; acting_agent.env secrets are
named by Harbor's own rule; each step's allowed hosts reach the driver;
the answer agent waits for its plan's window; a long task name's
verifier containers are found as Harbor names them; a dataset's digest
takes a link as the link itself, not the file it points to.

Tests of the reverted code are back at main; the Harbor tests cover the
new code. Docs and the changelog describe the PR as it is now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The first audit of the rework (2b2a46b) found no high issue, three medium and six low; a second audit of those fixes
found no high issue, five medium and ten low. Each is fixed here, in hermit/harbor/, its docs and its tests, or
recorded as a candidate where the fix is main's.

- An adapter whose own deployment or per-task context fails in its child process is the agent's result: agent_error
  (adapter_failed), scored 0 with its message as the feedback, which `python -m hermit.harbor.report` counts among the
  scored trials. It left the pipeline as an exception before (status error), outside pass@1.
- A stream's step that ends in any way before its driver is asked for it (its staging, its adapter, its tools, its
  launch plan, the disk gate, its turn's wait running out, its turn's sign-in or tools not readied, an exception of
  any of them) gives the stream up, so its driver is stopped once the stream's rollouts end, that step's own when it
  is the last, and the stream's next pass (an eval's next repeat, a later epoch) starts from its first step in a new
  environment. Before, the driver stayed up for a step that never came: the next pass's first steps ended
  stream_order and its last ran on the environment the pass before had left. A step the driver already ran gives
  nothing up. A later step of a stream with no driver and no rollout of its first step ends before anything is staged
  or served for it.
- A runner's unfinished streams are closed by its finalizer, when the runner is freed and at exit for one still held
  then. Before, a weak set of runners was closed at exit, and a runner freed before then (`hermit check`'s probe,
  `hermit eval` once it returned) left its drivers up for stream.idle_s.
- The docs say what a resumed `hermit train` does to a stream under way (its remaining steps in that epoch end
  stream_order, and the stream starts over at its first step's next rollout), and what an Evolver's run_agent of a
  stream's first step does once the Trainer's pass of it finished: it starts a pass the next epoch inherits.
- A request the provider refused for the run's configuration (model_rejected) is not run again (NO_RETRY), and
  NO_RETRY is tested with runs again allowed; nor is a host failure past the trial's staging (host_failed, whose
  session may have run), which the docs now say. The `halted` cause, which nothing gives any more, is gone.
- Codex: a session the provider refused for the run's configuration or bill (a 400, 402 or 404 Codex does not retry,
  an API account's quota) is model_rejected, as the other CLIs' are, never the agent's 0. Its usage limit is read
  from Codex's own notices, never from what its log quotes of the session's work, and a JSON line its log quotes no
  longer ends the record. A session that failed on its own after a reconnect Codex went on from, or whose response
  the provider's content filter ended, is no outage.
- The answer agent's model a CLI reaches: its sessions run with plan_rerun off, so that a session the plan refused
  comes back at once (infra, run again once the plan allows) instead of waiting for the window inside the agent's
  time and scoring as the agent's timeout; its sign-in is checked at startup; its CLI sessions get main's check that
  the user's own secrets are absent (HOME_SECRETS). The runner refuses a run config's own `{cli}` model for the answer
  agent as written, as `hermit check` hands it, as well as the endpoint spec `hermit eval` and `hermit train` hand it,
  whose test builds it with main's endpoint_spec.
- The docs say that `hermit check` builds the runner and reports its startup refusals, and that every run of
  Hermit's agents needs bubblewrap, a baseline's too (the runner cannot tell a run that deploys no adapter), unless
  sandbox_enforce or HA_ADAPTER_SANDBOX_ENFORCE says best_effort.
- The report says when an eval did not finish: no summary.json beside its rows, one that is not of them (its count of
  trials, of failed runs or its mean score differ), or a last row cut off, which is left out. It reads the summary,
  never the files' times, which a copy changes. The docs say that a stopped eval writes no row of the repeat it
  stopped in.
- A plan refusal's hold gets the run's stop, so that a hold that cannot be written waits no longer than the run. The
  docs record that trials racing on one ChatGPT copy for its refresh end the run: the loser's refusal reads as a lost
  sign-in.
- FRAMEWORK_SUPPORT.md names the four private helpers of main that hermit/harbor/ uses, and more candidates: a
  trial's usage when LoginFailed ends the run, the run's own secrets for the answer agent's sandbox, public names for
  those helpers, rows that say who runs them (run_agent's or the Trainer's), the `login: claude` check of `hermit
  train`, RRSI's halt file. The docs no longer say a trial a lost sign-in ended keeps its runs' usage, and
  bind_agent_params is named right.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The audit of e19d155 found no high issue, two medium and twelve low, and asked eleven questions. Each is fixed here,
in hermit/harbor/, its docs and its tests, or recorded as a candidate where the fix is main's.

- Pi's and dsh's trials get the backend's developer_role, as Hermit's own sessions do: the spec the config's loading
  keeps drops it (Binding.spec), so the runner takes the backends registry's for a backend it names at the same URL.
  A test compares a trial's provider settings with main's bind_agent_params on Fireworks (developer_role: system).
- `hermit check` and `hermit train` check a Harbor run's acting model as a chat client's, main's rule for an agent it
  does not know: they refuse Claude Code on Anthropic's API, which `hermit eval` runs, and do not check that Codex's
  backend serves the Responses API. The docs say so, and candidate 7 names the cause in main.
- On a login, busy_retries is one count over all of a trial's runs: infra_retries no longer multiplies it (up to 12
  runs by default, where the docs said 4). A plan refusal of the answer agent's model runs the trial again once the
  plan allows, not counted in infra_retries.
- A staging or per-task-context child that failed is the host's failure (staging_failed, run again), not the
  adapter's 0, when this process sees this machine fail any adapter's staging there: a folder it cannot write, less
  than 64 MB free, the strict adapter sandbox not starting. Startup refuses a runner whose bubblewrap cannot start
  that sandbox.
- A trial's launch plan refused for what its adapter is (its tools beside text_only, a dsh server name made of a long
  id) is adapter_failed, scored 0, for a trial and for a stream's step; with no adapter it is still the config's
  error.
- A provider that does not bill the account (a 402, its quota or credit spent) ends the run, as an API account's usage
  limit does. Before, every later trial ended model_rejected.
- acting_agent.settings.env refuses a secret's $NAME inside a value by every rule (AUTH, PASSWD, Harbor's), and a
  secret's value written as it is. `effort: off` gives no effort flag, as on main.
- The answer agent writes answer.json as a new file renamed into place, never through a link the container left
  there. Codex's auth.json is removed from the container once it has been copied back, before a verifier that shares
  the container runs.
- The curated log's top stream is the one the launch plan names. The report adds a note when results.jsonl was
  written after summary.json, as by an eval stopped beside an earlier summary. The runner's finalizer gives each
  driver 2 minutes (CLOSE_STOP_S) before it kills it.
- Tests for each fix above. They also catch four mutations no test caught before: the turn's sign-in copy, the first
  give-up reason, Codex's outage reading, and the report's errors comparison.
- Docs that did not match the code: what `hermit eval` reads of a config made for it alone, the causes never run
  again, only a first step starting a finished stream over, the CLI Evolvers' run_agent, the stream socket's path,
  split files with more than one rollout, Harbor's own usage-limit error, when the `login: claude` warning fires, a
  quoted line in Codex's own form, the relay's sandbox, the deployment record's host paths, and hermit check's probe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
Main has gained Hermes Agent as a CLI Base Agent (#107, 616e818) since this PR's base, e813538. In the rebase, each
conflict keeps both sides: #107's Hermes in the docs' lists and tables of CLIs, and this PR's Harbor beside it. A
Harbor trial does not run Hermes: the runner refuses `acting_agent.cli: hermes` at startup, as it refuses any CLI
with no HermitXXX class, which a new test holds. The docs now say so (the acting agent's row in
docs/framework/task.md, the CHANGELOG entry), and FRAMEWORK_SUPPORT.md counts five other hosts that take
`serve_tools`, Hermes's among them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
… gate held

The round-11 audit of a332854 found no high or medium issue; these are its low ones and what its questions found.

- A Pi or dsh trial's developer_role is the backends registry's only for the backend the registry has at the trial's
  URL (launch._with_role): the run config's `backends:` is not the runner's to read, where Hermit's own sessions take
  it. FRAMEWORK_SUPPORT.md (candidate 14), docs/framework/task.md and the changelog said the trial got what Hermit's
  sessions get; they now say where it does not, and a test holds the URL check, on both of the spec's paths.
- acting_agent.settings.env refuses a value given as it is to a variable a word of whose name is a secret's wherever
  the word stands (HF_TOKEN_READ, OPENAI_API_KEY_2, SECRET_ID), not only at the name's end (launch.SECRET_VAR); a word
  that only holds one (GIT_AUTHOR_NAME, TOKENIZERS_PARALLELISM) is no secret. A test now holds Harbor's part of the
  rule for a `$NAME` inside other text ($OAUTH_CLIENT_ID).
- The verdict of a trial, or of a stream's first step, that a disk gate held back na
10BC8
mes the gate that held it, the
  host's /tmp or Docker's data root; it named the data root whichever held it.
- Tests for what none caught: the answer agent's relay's 402 whatever its words, the stop a runner's close gives each
  driver (CLOSE_STOP_S), a job folder this process cannot write (the host check after a failed staging child).
- docs/framework/task.md says what the questions found: a login's wait for its plan has no bound, a request the plan
  held back at any time makes its timed-out trial infra, a refused session runs again as often as the plan refuses,
  the host check comes after the staging child, and N hung drivers hold a close up N x 2 minutes. The changelog's
  Codex refusal no longer reads as every 400 or 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
iamziyuzhao and others added 2 commits November 17, 2026 11:29
…ls for good

The audit of 6a79375 found one high and four medium issues and fifteen
low ones. This fixes the high and medium ones, and fourteen of the low
ones (one is in the PR's description); the last is noted there.

- High: a stream's next pass (an eval's next repeat) could meet the
  driver of the pass before in the half second between its last answer
  and its exit, take it for a live one, and lose the whole pass. The
  driver's record now says it is ending before its last answers
  (harborside.driver._mark_ending); StreamClient.running takes neither
  such a driver nor one killed and not yet reaped, and ensure() waits up
  to 30 s for an earlier driver to exit, then kills it, before it starts
  the next.
- Medium: a step whose own folder this machine cannot make now gives its
  stream up (host_failed), so its driver is stopped and the next pass
  starts anew. Before, the driver waited for that step, and the next
  pass ran its last step on the old environment.
- Medium: a step's curated log walks the agent's folders through open
  directory handles and opens each entry with O_NOFOLLOW (curate._files,
  and open_regular for the files at its top). A link that a process the
  agent left running swaps in while the stream's environment stays up is
  never followed, and a file gone meanwhile is left out without an error.
- Medium: Codex's refusals for good are read in its own words: a
  provider's error body Codex passes on as it is, "model is not
  supported", and its plan refusals (a workspace out of credits, a spend
  cap, a plan without Codex). The plan refusals end the run, as a 402
  does.
- Medium: the answer agent's relay reads a 429 for a spent quota
  (OpenAI's insufficient_quota, as its code or its type) as the bill's
  refusal, which ends the run, not as an outage that runs again.
- Low:
  - A relayed Codex session that main's reader leaves a 502 but whose
    stream says it was refused for good is a 400 with Codex's words.
  - The disk gate's verdict names the room for the task's image and for
    other trials' pulls, and a stream's first step keeps room for its
    image until its environment is up.
  - A step waits for its turn over the earlier steps' own budgets.
  - Refused at startup: a benchmark file's {cli} model without a login,
    which the runner cannot bind, and a login in acting_agent.settings.
  - A relative mini-swe-agent settings.config is read beside the params,
    as the runner's other paths are.
  - The texts on the line reader, the secret-name rules and their
    tradeoff, the time a kill takes at exit, the answer agent's effort,
    and a Harbor Claude session's token (on a descriptor).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
…hods

Terminal-Bench 2.0, SWE-bench Verified, AlgoTune, Terminal-Bench-Science and LAB-Bench FigQA through Harbor, each a
benchmark file (the registry's task set, locked), a baseline per profile (Codex with GPT-5.6-Luna on a ChatGPT login,
Claude Code with Claude Haiku 5.5 on a Claude subscription) and the method whose paper's protocol fits it: the AHE
Adapter on Terminal-Bench 2.0 in the AHE paper's in-sample protocol, trained on each task's rollouts #1 and #2 and
tested on #3 and #4; its final adapter, frozen, on SWE-bench Verified and Terminal-Bench-Science against AHE's seed;
SkillOpt in its paper's protocol on AlgoTune, a trial scored 1 - 1/speedup so that the mean gives AlgoTune's harmonic
mean (a success, by which SkillOpt's analysts and slow update sort the rollouts, a solver faster than the reference),
and on LAB-Bench FigQA, whose download is patched: the published tasks save the shuffle's seed where the agent reads
it, which gives the answer away, and their verifier runs a script the agent can rewrite. LAB-Bench's test questions
whose figure no training question has are listed for a second score from the same trials (utils/figures.py reads an
eval's results).

Every run is the framework's own commands on a config, as on main: a baseline is a config for `hermit eval` alone
(`--adapter none`, or an adapter directory: a transfer's, or AHE's seed as the template's directory), whose training
keys are placeholders (its Evolver, `eval-only`, one that `hermit train` does not find); a method is `hermit train`
and then `hermit eval --adapter final` (and `--adapter root` for its seed or empty skill where no baseline tests it, an
adapter of the same run's tree); a whole benchmark's test is an override of the same config
(`data.test=../utils/splits/all.txt` with its own run name). An eval's number is the pass@1 that
`python -m hermit.harbor.report` gives over the trials that are the agent's result: #105's runner runs an infra trial
again, then records a failed run, 0 in `hermit eval`'s mean. AlgoTune's harmonic mean and LAB-Bench's second score
read the rows the same way, and say when an eval did not finish. No trial is taken from an earlier run: there is no
trial cache.

SkillOpt's configs give its analysts no Codex trace summary (it describes SkillOpt's own harness). Every learner on a
login waits for the plan's window (`plan_max_wait_s: null`); AHE's learners' clocks count the wait, as on main.
examples/README.md says what a machine needs (bubblewrap for every run, a baseline's too) and lists every run with its
trials, to be handed out; examples/conftest.py keeps `python -m pytest` out of a prepared task set and a run's
`runs/`, and examples/.gitignore keeps the task sets' links out of git; tests/core/test_harbor_examples.py holds the
protocols to the committed files (every learner's wait for the plan among them), loads every config as its command
does (a baseline's refused by `hermit train`) and builds #105's runner from each config's settings, its startup checks
included (this machine's sign-in and bubblewrap stood in for).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
@iamziyuzhao
iamziyuzhao force-pushed the harbor-benchmark-examples branch from cb7184e to d8496e4 Compare November 17, 2026 16:32
… and stop

- build_tasks.py imports task_text from utils/task.py (the module it named is gone)
- Claude Code on a backend that needs no key gets its placeholder token
- the answer agent's Codex model has web_search off unless given
- a row without an instruction gets Harbor's instruction for its context
- a benchmark's patch is loaded without writing __pycache__ beside it
- a launch's plans folder is the user's only (0700)
- curate opens a reward file and hermit-copy/memory without following links
- an answer trial whose agent sent no request costs 0, not unknown
- a spent quota ends the run even when the agent's time ran out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
haizhongzheng added a commit that referenced this pull request Nov 18, 2026
…ing commands and configs (#105)

* Shared layers: a Harbor trial of any CLI is deployed, bound and read as Hermit's own sessions are

What the Harbor runner needs of the layers every method shares, so that a trial in a task's container is one more
session of the CLI's Base Agent:

- The hosts deploy for a caller that serves the adapter's tools itself (`--no-serve-tools` on every host; Pi's and
  dsh's `prepare(serve_tools=False)` names no server, and the acting agents' workspace now passes the flag on, so a
  container session of Hermit's own runs gets no server row it cannot start) and take one task's context
  (`--context-file`).
- Every CLI Base Agent reads a stream its caller read elsewhere: `outcome()` with no stream file reads the stream's
  text as it reads the file, the reply included; a missing or empty stream is a session not served, never a TypeError.
- A Codex session whose sign-in or key the provider refused is `login_failed` (the run stops) if its turn did not
  complete, read from its own notices: never one it recovered from, what its log quotes of the session's tool calls,
  or an event's text (U+0085, U+2028 and U+2029 end no line of a stream); `unavailable` comes from its last failure.
  Codex's records are read with span prefixes too (`RUST_LOG=codex_core=info`).
- hermit.agent.base.trajectory, the AHE Debugger, Harness²'s bench, RRSI's render and SkillOpt's Codex trace read a
  Harbor trial of any CLI (`agent/agent-<backend>.jsonl`, then Harbor's own output files, then its ATIF trajectory,
  which the Debugger takes before those files), and AHE's texts (EVOLVER.md's too) name that trial's files (the
  stream, hook audit and state under agent/; the record's instruction, as the Debugger's `task0i.md`; START.md's
  tree). Harness²'s bench takes a Claude Code trial's final message as the Base Agent reads its reply. MWM counts a
  learner session's turns and actions from the events the common reader reads (a line of the CLI's own that is no
  JSON object, or an event holding U+2028, no longer fails the step) and finds a task's record by the material's own
  file name.
- A Harbor acting agent's model is bound and checked in the acting CLI's dialect (`agent (harbor, <cli>)`, an
  endpoint's too), the whole Binding spec kept, developer_role included, and its login is a contained session's
  (logins_of) unless `claude_bin` names this machine's Claude Code, whose version is then checked; the task set's
  benchmark file counts for both, as the runner merges it (relative to `normalize_config`'s `base`, else the working
  directory). hermit.harbor.clis is the table of those CLIs.
- A client of a CLI's chat endpoint counts what a session that failed or that the provider refused used, which the
  endpoint reports in its error body (ChatClient's `count_error_usage`, set by `endpoint_spec`).

tests/selection.py counts the recorded OpenCode and dsh streams as shared: the methods' tests read them too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Core: infra runs, configs for hermit eval alone, and a multi-step task's steps in order

What a Harbor task set needs of the framework's own commands and configuration. There is no new way to run: training
is `hermit train`, testing is `hermit eval --adapter ...`, each set by the run's YAML and overrides as before.

- A run that is not the agent's result (`RunOutput.extra["unscored"]`: a Harbor trial of status infra) has status
  `infra`: never judged, its score null in steps.jsonl, left out of the Trainer's and `hermit eval`'s means and
  counted (`unscored`, in the summaries, the learning material and the card). `eval.infra_retries` and
  `eval.infra_wait_s` make `hermit eval` run such rows again, except a multi-step task's step rows, a task Harbor runs
  for none of Hermit's agents (`unsupported_task`) and any after a halt (a lost login, a usage limit).
- `hermit eval` needs only what it reads (`data.tasks`, `data.test`, the agent, the judge): a config with no
  `data.train`, such as a baseline's, needs no template or Evolver; `hermit check` checks it as `eval` runs it (its
  probe on a test row), `hermit train` refuses it, and its run name is the config file's when `trainer.run_name` gives
  none. An adapter of the run's tree (`final`, `root`, a tag, a commit) needs that tree: without one, `eval` refuses it
  before any run. The `eval` section is checked where an eval runs.
- With `eval.repeats` above 1, each repeat hands the pipeline copies of its rows that name it (`repeat`), so that a
  pipeline that keeps its trials by row (Harbor's trial cache) runs each repeat anew; results.jsonl names the repeat.
  With `trainer.epochs` above 1 each epoch's rows name the epoch (`epoch`), and the rows `run_agent` runs, and those of
  a task the epoch's order names twice, ask for a new run (`fresh`): such a pipeline runs each anew, an epoch on an
  adapter the one before left unchanged included, where it would have handed back the earlier trial.
- A multi-step Harbor task's steps run in order in its stream: `data.shuffle` moves its rows as one; a split whose
  order is kept (the train split with `data.shuffle: false`, the test split, the validation split) that lists a step
  ahead of an earlier one, or without every earlier one, is refused before any run, and `hermit check` reports it;
  `next_tasks` may name a step only after the earlier ones; `run_agent` runs no training row that is such a step, and
  an id it does not run comes back as an error result (score 0), no longer an exception; Harness² fails such a step
  before any editor session, and records an infra execution's cause beside its null score. A run runs each step of a
  stream once, in one environment: a train split with such steps trains one epoch (`hermit train` refuses more, and
  `hermit check` reports it). `hermit check` checks the test split's order for a training config too, and its probe
  runs no later step.
- The Harbor task set's tasks and jobs directories, and an eval config's tree, are run secrets. The Harbor agent is
  told what its streams are named for (`run_identity`: a training run's record directory and the id it keeps there,
  any other pipeline its own), whether they are kept for a resume (`keep_streams`: the Trainer's pipeline only, until
  the run finishes), the run its trials are kept to (`trial_scope`: the Trainer's pipeline only, that identity),
  whether the run deploys adapters, and the CLI and login of a model only a CLI reaches; `hermit check`'s probe takes
  no trial from the trial cache.
- An acting agent of Harbor's own takes no adapter: `hermit train` refuses it, `hermit eval` runs it with
  `--adapter none` only, and `hermit check` reports it for a training config.

tests/core/test_harbor_core.py covers these. What this commit hands the Harbor agent, the next commit's runner takes:
three of these tests (Harbor's `dataset prepare`, and a pipeline closing its HarborAgent with its streams) pass from
there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Harbor: every CLI in the task's container from one launch plan, with the adapter's tools, context and notes

A Harbor trial ran only Codex well (and Claude Code through code of its own); the adapter's tools, a per-task context
and an adapter's notes never reached the container, and infra trials counted as zeros. Now:

- One HermitXXX class per CLI (hermit.harbor.clis: codex, claude, pi, opencode, dsh, mini-swe-agent) over one executor
  (harborside/hermit.py). Hermit's side renders each trial's session with the CLI's own Base Agent
  (hermit.harbor.launch: the home, the command, the environment; host paths made the container's) against the adapter
  deployed as `hermit deploy` lays it out, and harborside uploads and runs it as the task's agent user: the prompt on
  stdin, the stream in agent/agent-<backend>.jsonl, the deployment record always there (so an adapter's hooks run on
  Codex too, HERMIT_HOOK_LOGS set), a session still running at Harbor's timeout killed with its process group. The
  steps after the session still run past that timeout, and keep the session's own error when the timeout lands in
  them; a copy that failed is dropped, never kept in part. A `<cli>_bin` serves only at the asked-for version and when
  the agent user may execute it. The runner reads the stream back with the same Base Agent: reply, served, the plan's
  or the provider's refusal, the usage at `agent.params.price`, else at the backend's price.
- The adapter's tools are served from this machine on the Docker bridge's gateway (hermit.harbor.tools, every call
  logged); a per-task context is computed in the adapter sandbox (hermit.harbor.context); an adapter's notes come back
  after the session (memory/ in the log).
- A key or a token reaches the container by its variable's name only (`docker compose exec -e NAME`; Claude Code's
  subscription token on a descriptor), never in a command line, a file, the plan or a log; Codex's ChatGPT sign-in is
  a file of its home there (mode 600). Codex and Claude Code run on the user's subscription
  (`login: chatgpt | claude`) in the plan's slots and holds, each trial noting the plan's usage (so `MAX_USED` holds
  trials back): a refused session again after the window, one the provider could not serve after a pause unless it
  ran out of the agent's time, a lost sign-in never, none once another trial halted the run; the trial's usage is
  every run's. Codex's refreshed sign-in comes back and becomes the shared copy. A task whose agent network is not
  public gets the model's and tools' hosts allowlisted and web search off; `web_search` must be set.
- The answer-only agent (`cli: answer`) makes one model call through an endpoint the runner serves and writes the
  answer into the container (LAB-Bench's questions); a request still in flight when the trial ends is given up, its
  cost unknown, and on a model a CLI reaches on a login the trial waits for that plan first (a request the plan held
  past the agent's time is infra, `usage_limit`). A question or attachments it cannot read fail the launch.
- The judge scores the verifier's reward whenever the verifier gave one, a timeout or an agent error included
  (Harbor's own mean), says "passed" at `pass_reward` (null for a score scale) and leaves out what `verifier_redact`
  matches. Not the agent's result, so unscored (infra): a verifier whose tools never downloaded or that hit a full
  disk, harborside's launch failing (HermitLaunchError, the CLI's install included), a session that never started or
  whose tools never came up, a lost sign-in, a Claude Code, Pi or OpenCode session or an answer request the provider
  refused for the run's configuration before serving any (its key, model, bill or a setting it does not take:
  `model_rejected`, no halt), a task Harbor runs for none of Hermit's agents (MCP servers, a skills folder, a Windows
  container: `unsupported_task`, never handed to Harbor; the set's other tasks run). A trial out of the agent's time
  is the agent's even after a provider notice, and so is a request refused for its input; the adapter's context over
  the CLI's limit beside the image's own is the adapter's 0, and so is a session the model's safeguards ended. With
  `verifier_timeout: agent` (a verifier that times the agent's solution, as AlgoTune's does) a verifier out of its
  time is the agent's result, and Continual Harness's Refiner reads it as that, not as a session past its clock.
- Startup refuses what every trial would: a login for another CLI, a login and a binding at once, a loopback model, a
  missing key or sign-in, a non-Docker environment for secrets by name, a plan the Base Agent cannot render
  (mini-swe-agent's: web search, a model class Hermit does not read), a `harbor` that is no executable file,
  mini-swe-agent without its package for a run that deploys adapters, the answer agent's attachments on a model a CLI
  reaches. Harbor's own claude-code gets a bound model's Messages API root (it was sent to /v1/v1/messages), keeps
  Harbor's per-task web rule unless `web_search` is false, and is refused the subscription (`CLAUDE_FORCE_OAUTH`, or
  the subscription's token as its only sign-in).
- `python -m hermit.harbor.dataset prepare` makes an example's data from its benchmark file's `dataset:` block (the
  registry's tasks, rows, splits, smoke rows, a patch, the images' sizes with `image_sizes: true`, a lock). A download
  is moved into place only once whole, and what is in its way is refused first; a relative `data:` is the benchmark
  file's folder's. The lock and the download record the tasks' source (a download of another source is never reused,
  and the default data directory is the source's own); the lock holds no path of this machine and hashes only a mode's
  executable bit (one written under a umask other than 022 needs writing again); an unreadable lock is refused unless
  `--force`.
- Also, from the Terminal-Bench 2.1 runs: a host failure (Docker's, the host's /tmp full) is infra and no trial starts
  while /tmp is short; the trial of a task whose name is longer than 32 characters is found; a `harbor run` past its
  wait budget is killed and its trial's compose projects, the verifier's too, taken down by name alone (no compose
  file or `COMPOSE_*` variable read). A stream's step runs its own plan, its verifier read as a trial's; each `hermit
  eval` repeat and each run gets streams of its own, stopped when the run ends unless a `hermit train` may resume
  them. The trial cache keys the launch, the whole row, the task's files, the model's price and the adapter as
  deployed (a file's executable bit, not the bits a umask sets; not the adapter's card, which no deployment copies, so
  a final adapter tested again meets its trials); a cached trial costs nothing again; a training run's trials are its
  own (only the run, resumed, meets them) and each epoch's too, a row asking for a new run (run_agent's, a task a
  split names twice) is neither taken nor kept, and `hermit check`'s probe neither takes one nor keeps one. The
  benchmark file's price applies to its own model, and a model the config gives as an endpoint mapping keeps its own
  price.
- OfficeQA's Harbor judge reads the final message from HermitCodex's stream (`agent-codex.jsonl`): a task set built
  before needs building again.
- Docs and CHANGELOG for the whole change (the framework's task, configuration and command pages; the methods' pages;
  the Breaking entries: the runner's `codex_login` is gone, `login: chatgpt`; a table CLI's trial needs `web_search`;
  secrets by name run on local Docker only).

Checked in real containers on this machine, each run a `hermit eval` of a config for it alone: Codex on the ChatGPT
login (no adapter; tasks with an open and a closed network; the adapter's MCP tool, AHE's hooks, Continual Harness's
notes, ASPIRE's template) and Claude Code on a subscription token (an instruction that begins with `/`, the MCP tool,
AHE's hooks); Pi, OpenCode, dsh and mini-swe-agent on a scripted model; the answer agent; a three-step stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Review fixes: the post-PR audits of 2d9401c and 3aa0cc2

The post-PR audit of this PR's 2d9401c found one high issue and six medium ones, and the audit of #106's 3aa0cc2 one
medium issue in this PR's code; each is fixed here, and so are five of the low ones.

- Claude Code on Anthropic's own API with a key (`acting_agent: {cli: claude}`, `anthropic/<model>`, no login)
  started every session without a token: the launch script exported the plan's empty ANTHROPIC_API_KEY before
  ANTHROPIC_AUTH_TOKEN read the key from it. A variable the plan passes under another name is now set first, in one
  export that reads every source as Harbor passed it; a source no entry sets is unset, and the plan's own variables
  come after.
- A Harbor halt (a lost sign-in, an API account's usage limit) ends `hermit train` unfinished at the step that met it,
  before its learner (after the learner's call when a run of `run_agent`'s met it), and a resume runs that step again:
  before, every later rollout came back infra/halted while the learner went on, and the run ended as finished.
- Whether the provider could not serve a Codex session is read from its last failure since the session last worked,
  never from a warning of Codex's (the trust it gives a deployment's hooks), and a turn that failed, or a stream that
  ended, while Codex retried its requests is one it could not serve, unless the sign-in was lost: Codex 0.164 that
  cannot reach chatgpt.com fails its turn with `workspace routing discovery failed`, which the last-failure rule had
  made the agent's empty answer. Codex 0.164's own words for a lost sign-in are matched.
- A ChatGPT sign-in a session hands back replaces the shared copy only as a later, well-formed refresh: a regular file
  of at most 64 KiB (a container's larger one is never downloaded) holding its refresh and access tokens, for the
  copy's account, stamped after the copy and at most a minute ahead of this machine's clock (an hour where the clock
  may differ). Harbor no longer gets CODEX_FORCE_AUTH_JSON or CODEX_AUTH_JSON_PATH from the user's environment.
- Only a pipeline that keeps its trials by row (a Harbor task set with `trial_cache` on, in the config or its benchmark
  file: isolate.keeps_trials) is handed rows naming their epoch or asking for a new run; no record keeps `epoch` or
  `fresh` (rollout.TRIAL_KEYS), so the learning material's `input` and every learner's text of a task are the same in
  each epoch, and the adapter's per-task context gets the task's own row.
- A Harbor trial is scored as Harbor grades it: a verifier that left no reward Harbor could read or ran out of its time
  (`verifier_timeout: agent`, now the default; `infra` the opt-in for a host whose load makes verifiers time out), and
  a request of one of Harbor's own agents that the provider refused for what it held, are the agent's result, 0
  without a reward, unless the verifier's output shows its tools never arrived or the host's disk full; a provider
  that could not serve, or refused the run's configuration, stays infra (Hermit runs it again, where Harbor grades it).
  An OSError on this machine while the adapter is staged is infra (`staging_failed`); the adapter's own deployment or
  per-task context failing stays the agent's 0, since what its child process prints could be the adapter's words. A
  verdict that quotes the verifier's output applies `verifier_redact`.
- `dataset prepare`: a patched set is its patch's own. The download record names the patch (its hook and its file's
  digest), a reuse of another source's or another patch's tasks is refused before the patch runs, the default data
  directory is named by the patch too (an unpatched set's name as before), and a download is patched in its own
  folder before it is moved into place.
- The AHE Adapter's learners' clocks (`evolve_timeout_s`, the Agent Debugger's `timeout_s`) are the Base Agent's own,
  counted from the CLI's start: a wait for the login's plan or a session slot pauses them instead of spending them (a
  hold longer than a clock made the step a no-op recorded as done, or the Debugger's analyses upstream's fallback
  text). This reverses PR #65's choice that the Debugger's clock cover the plan wait: upstream's clocks had no plan
  hold to cover. `trainer.call_timeout_min` still bounds a step, waits included.
- `hermit train`'s refusal of more than one epoch over a multi-step task's steps gives its true reason.

Tests: test_harbor_harborside.py (every CLI's launch script on every backend run by bash, the returned files' limits),
test_harbor_runner.py (grading as Harbor does, staging, redaction, the sign-in back by the environment's clock,
Harbor's environment, a Codex outage), test_harbor_core.py (the rows only a trial cache is handed, the records, a
halt), test_harbor_dataset.py (patched sets), test_cli_agent.py and test_base_agents.py (Codex's outcome and lost
sign-in words, the take-back), tests/methods/ahe (both clocks through a real login path).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Review fixes: the post-PR audit of fe8c5b4

The post-PR audit of this PR's fe8c5b4 found two medium issues and eleven low ones; each is fixed here.

- A step of a multi-step task whose turn cannot come ends infra (stream_order) at once and starts no driver: its
  stream's driver waits for a step no rollout of the runner is running (one that ended before it reached the driver,
  or ran in an earlier training step), or the stream has no driver and no rollout of its first step is running to
  start one. Every later step of the stream ends the same way, and the last of them stops the driver. Before, each
  waited out its turn (by default its budget for each earlier step and an hour more), holding a rollout's worker, then
  ended infra, so a step that failed on this machine before it reached the driver, a halt (whose resume reran a later
  step on a new driver at step 1) or a driver gone lost the rest of the stream after hours. The runner keeps each
  stream's steps in flight; StreamClient.wait_turn takes what it asks.
- `trial_cache` with an answer agent on a model a CLI reaches (`model: {cli, model, login}`): the trial's key held the
  URL of the endpoint the run's pipeline serves the model on (its port and token, and the binding's `messages_url`
  derived from it), which no resumed run or other eval has again, so no trial was ever taken from the cache. The key
  names that model by its CLI and login.
- A new stream driver in a directory that held one sets the earlier one's trial and replies aside (`earlier/<n>/`):
  Harbor reuses a trial's step directories, so a step of a stream run again that left no output of its own was read,
  and billed, as the earlier run's.
- A stream driver that answers no stop within 15 minutes (hung in a step) is killed with its process group, and its
  trial's compose projects are taken down by name.
- An OSError on this machine while a trial's job and launch are written (its job directory, the launch plan, the
  agent's config, job.yaml), or a stream step's launch plan, is infra (`staging_failed`), as one while the adapter is
  staged is: before, it raised out of the rollout, the agent's 0.
- A rollout that never reached a container (a halted run's, the disk gate's, an unsupported task's, a staging that
  failed, a stream step its driver was never asked for) costs 0: before, its cost was unknown, which left the eval's
  total cost unknown. A stream step lost after its request was sent keeps an unknown cost.
- The ChatGPT sign-in's take-back reads the shared copy's own stamp as any accepted copy may hold it (at most an hour
  ahead of this machine's clock, as one from the user's own file), never as no stamp: an earlier file a session
  handed back replaced a copy stamped ahead of this clock.
- Codex's fall back from WebSockets to HTTPS retries nothing, so a request refused after it is the session's own
  failure; only its reconnects (`Reconnecting...`) are retries.
- `hermit eval` of a split that names a task twice keeps a row for each, as on main (the infra reruns kept the records
  by id).
- `<jobs_dir>/HALT` names the record's cause first (`login_failed`, `usage_limit`) and says that it halts every run on
  that jobs directory, as the docs now do.
- The docs: a sign-in file is checked for its size before it is downloaded (one grown after the check is refused when
  taken back); with Harbor's retry on, a failed attempt's usage is not counted; what `staging_failed` covers. The
  CHANGELOG's Harbor entry is rewrapped where earlier edits had cut its lines short.

Tests: test_harbor_runner.py (a stream's lost turns, at once and in order, a halt's resume, a rerun's outputs, a hung
driver, a stream step's launch, a lost step's cost, the CLI model's trial key, a trial's staging, a never-ran
rollout's cost, the halt file), test_harbor_core.py (a split that names a task twice), test_cli_agent.py (a copy
stamped ahead of this clock), test_base_agents.py (Codex's fall back).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Review fixes: the post-PR audit of 3a49adc

The post-PR audit of this PR's 3a49adc found three medium issues and fifteen low ones; each is fixed here or, where
it is a limit of the design, recorded in the PR.

- `trial_cache` with a model a CLI reaches: 3a49adc named that model by its CLI and login alone, so a second eval on
  the same jobs directory whose CLI had another effort, `bin` or version met the first one's trials. The key also
  holds the CLI's identity (`hermit.agent.base.endpoint.cli_identity`: its settings as its sessions get them, less
  where they run and log and which plan they wait for, and its binary's path, size and time of change), as a digest
  that hermit.isolate.agent_pipeline hands the runner (`model_cli_identity`). Harbor's `retry`, the adapter
  sandbox's `sandbox_enforce` and `tools_host` are in the key too.
- A trial whose agent ran out of its time or exited with an error is verified by Harbor and graded: when its
  verifier's tools then never arrived (a 5xx of GitHub's release download) or met the host's full disk, it is infra
  and run again, as one whose agent finished is. Before, it was the agent's 0 and stayed in the trial cache.
- Codex's words for a refresh of the ChatGPT sign-in the provider refused ("Your access token could not be refreshed
  [because your refresh token was already used / has expired / was revoked]. Please log out and sign in again.")
  are a lost sign-in: the run halts. Before, the trial kept Harbor's verdict, scored 0 and cached. A sign-in refusal
  counts only since the session last worked: one on a side request the session worked after is none.
- `run_tasks` submits each multi-step task's steps in step order, in the places its steps had: a `run_agent` call
  that listed a later step first, with fewer workers than the gap, gave the stream up and lost the earlier step too.
- A step whose stream aborted before its turn is never asked for (`wait_turn` checks the abort first), so it costs 0;
  and a trial whose environment or agent setup failed before its agent started (Harbor records no
  `agent_execution`) costs 0. Both had an unknown cost, which left the eval's total cost unknown.
- An OSError on this machine past the guarded steps (no process left to start `harbor`, a file it cannot write or
  read) is infra (`host_failed`), its cost unknown, not the agent's error scored 0. A trial cache this machine cannot
  write leaves the trial as it ended (it stands, uncached), an entry it cannot read is no trial kept, a key whose dry
  render cannot be written runs the trial without the cache, a sign-in take-back that fails leaves the trial as it
  ended, and a HALT file it cannot write leaves the halt to the rollout's output.
- A stream step run again sets the tool-call log an earlier run of it left aside (`earlier-<n>-tool-calls.jsonl`) at
  its turn, so its curated log holds its own calls only.
- A killed stream driver's socket is removed.
- Only a Harbor task set's rows name their repeat (`repeat`, with `eval.repeats` above 1), and no record's `input`
  keeps it; a record's `input` drops only the keys its caller added (the Trainer's `epoch` and `fresh`), so a row's
  own field of those names stays. Every other pipeline gets its rows and records as on main, and a Harbor adapter's
  per-task context never reads `repeat`.
- A failed `hermit eval` removes the earlier eval's `summary.json`, as it empties `results.jsonl`.
- The overlap error of a declared path names a Harbor task set's directories as such.
- The docs: `solved_once` counts each test id once; the steps of `run_agent`'s call run in step order; the cost of a
  trial that never started an agent; `host_failed`; the Codex refresh refusal and what to do about it; a copy stamped
  ahead by another clock is replaced once this clock passes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Review fixes: the post-PR audits of e7ace26 and b709e0c

The post-PR audit of this PR's e7ace26 found no high or medium issue and eleven groups of low ones; the audit of the
benchmarks PR stacked on it (b709e0c) found a medium issue here and a low one. Each is fixed here or, where it is a
limit of the design, recorded in the PR.

- `python -m pytest` imported the files of a run's folder beside an example's configs (`examples/*/runs`, their
  output_dir), a task container's and a learner's files among them, and ran them on this machine outside any
  sandbox: the root conftest ignores them, as it ignores a Harbor task set's.
- A pipeline that deploys adapters is refused at startup where bubblewrap is not installed and the adapter sandbox
  that renders each adapter is required (`agent.params.sandbox_enforce`): each trial ended in the sandbox's error,
  scored 0.
- A rollout that met a halt (a lost sign-in, an account's limit) and then an OSError of this machine (its curated log
  not written: a full disk) came back `host_failed` with no halt, so that nothing halted where its HALT file could
  not be written either: it keeps the halting verdict. A jobs directory this machine cannot make is `host_failed` at
  a cost of 0, not an error scored 0.
- A stream step whose turn never came curated the tool-call log an earlier run of it left as its own: it curates none.
- A verifier's words of a full disk (ENOSPC) made a trial infra eve
10BC8
n after its tests ran: now only before its tests
  wrote a report (`ctrf.json`), so that a test's own output (an agent's program, a task about a full disk) stays the
  agent's result.
- The copy-back and the collect ran as root in /logs/agent, which every user can write in, through a link the agent's
  user could put there, and made what it named readable to all: each makes a new folder of root's, enters it, checks
  that it is that folder, and works in it by relative names.
- `acting_agent.env` is written into each trial's job and onto `docker compose exec`'s command line: a variable of a
  secret's name, or a value naming one, is refused at startup.
- The `tasks` link is followed once (`tasks_dir`), so that a prepare pointing it elsewhere mid-run changes neither a
  trial's task set nor the key it is kept under; a task's link to a folder is in its digest by where it points.
- A codex, claude or pi trial of a model a CLI reaches got the loopback refusal once the pipeline served that model:
  it is refused for what it is.
- A row of its own `epoch`, `fresh` or `repeat` field is refused where the framework adds those keys (hermit train
  with the trial cache, hermit eval's repeats of a Harbor task set; hermit check says so too): they would replace it,
  and no record would keep it.
- `dataset prepare`: a data directory that is the set's own folder in another download is that download's (its
  marker is beside it), refused to a benchmark of another patch; a download is marked in its own folder before the
  set is moved into place; an image whose size cannot be read anew keeps the earlier one; split counts are whole
  numbers, and a smoke task is named once; the rows, the lock, the splits and the sizes are all made before any is
  written, so that a refusal leaves the link and every file as they were; a `data` naming a variable that is not set
  is refused; this machine's errors (an OSError, Harbor's failed download) are the command's `error:`, exit 1.
- An ATIF trajectory's tool-call id that is no string (a list, an object) reads as no id, never a TypeError in each
  learner reading the log.
- Tests: a trial-cache key this machine cannot make, a sign-in take-back that fails, MWM's name of a task's record.
- The docs: a command a CLI ran in a session of its own (Claude Code's shell tool) is outside the process group the
  kill reaches; a `timeout` or an `agent_error` scores 0 when its verifier left no reward.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Review fixes: the post-PR audit of b9a3d61

The post-PR audit of this PR's b9a3d61 found no high or medium issue and four groups of low ones. Each is fixed
here; its questions are recorded in the PR.

- A `hermit eval` refused at its start (a row of its own reserved key, or a pipeline whose startup checks refuse it:
  no bubblewrap, a secret in its env) had already emptied the earlier eval's results.jsonl and removed its
  summary.json: the eval empties them once its pipeline and judge are built, as on `main`, and a refused start leaves
  them as they were. One that fails after its start still leaves no earlier summary.
- `acting_agent.env`'s secrets are read as Harbor fills its values: `${NAME:-default}`, which Harbor fills in from
  this process's environment, is refused like `${NAME}` (it got through), and a referenced name is a secret's by the
  rule the variable's own name is (`launch.SECRET_VAR`), so that a setting named like one
  (`${TOKENIZERS_PARALLELISM}`) is no longer refused. `$NAME`, which Harbor hands on as that text, is still refused
  where it names a secret, as it never passes the secret the config meant.
- `hermit check` refuses a test row's own `repeat` wherever `hermit eval` of the config would (a training config's
  eval too), by eval's own rule (`_harbor_rows`), and a test now covers it.
- Tests: an unused fixture, a temporary directory outside the test's own `tmp_path`, blank lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Rework: Harbor's needs in hermit/harbor, the agent layers as on main

Everything in hermit/ outside hermit/harbor/ is back at main (e813538):
the three agent layers, the Trainer, hermit eval, hermit check, the
configuration, the sandbox, the methods and the hosts, but one change.
Pi's and dsh's prepare take serve_tools, as the other four hosts
already do, so that a trial gets the adapter's tools from the runner.
hermit/harbor/FRAMEWORK_SUPPORT.md lists where each of Harbor's needs
now lives, and what could later become framework support.

What a Harbor task set now meets:
- A trial that is not the agent's result (infra) runs again in the
  runner (agent.params.infra_retries, 2; infra_wait_s, 300 s). One
  still infra is refused by the judge, so the run records a failed run
  (judge_error): hermit eval counts it among its errors and as 0 in its
  mean. python -m hermit.harbor.report gives pass@1 over the trials
  that are the agent's result.
- A lost sign-in, or an API account's usage limit, raises LoginFailed,
  which ends hermit train and hermit eval as a local session's does.
  There is no HALT file.
- There is no trial cache; agent.params.trial_cache is refused.
- A multi-step task's stream is the runner process's own and is never
  resumed; a split keeps its steps in order (data.shuffle: false).
- A Codex trial's lost sign-in and provider outage are read in
  hermit/harbor/signin.py (the outage by the session's last failure, so
  a reconnect Codex recovered from is no outage).
- The answer agent's model that only a CLI reaches is given in the
  benchmark file; a run config's own is refused at startup.
- A trial's log keeps the CLI's stream, task.md, prompt.txt,
  last_message.txt and the hook files at its top, where the methods
  read a local session's.

Fixes of the last audit (of 418a00d): a stream's step gets the sign-in
at its turn, not when its rollout began; acting_agent.env secrets are
named by Harbor's own rule; each step's allowed hosts reach the driver;
the answer agent waits for its plan's window; a long task name's
verifier containers are found as Harbor names them; a dataset's digest
takes a link as the link itself, not the file it points to.

Tests of the reverted code are back at main; the Harbor tests cover the
new code. Docs and the changelog describe the PR as it is now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Review fixes: two post-PR audits of the rework

The first audit of the rework (2b2a46b) found no high issue, three medium and six low; a second audit of those fixes
found no high issue, five medium and ten low. Each is fixed here, in hermit/harbor/, its docs and its tests, or
recorded as a candidate where the fix is main's.

- An adapter whose own deployment or per-task context fails in its child process is the agent's result: agent_error
  (adapter_failed), scored 0 with its message as the feedback, which `python -m hermit.harbor.report` counts among the
  scored trials. It left the pipeline as an exception before (status error), outside pass@1.
- A stream's step that ends in any way before its driver is asked for it (its staging, its adapter, its tools, its
  launch plan, the disk gate, its turn's wait running out, its turn's sign-in or tools not readied, an exception of
  any of them) gives the stream up, so its driver is stopped once the stream's rollouts end, that step's own when it
  is the last, and the stream's next pass (an eval's next repeat, a later epoch) starts from its first step in a new
  environment. Before, the driver stayed up for a step that never came: the next pass's first steps ended
  stream_order and its last ran on the environment the pass before had left. A step the driver already ran gives
  nothing up. A later step of a stream with no driver and no rollout of its first step ends before anything is staged
  or served for it.
- A runner's unfinished streams are closed by its finalizer, when the runner is freed and at exit for one still held
  then. Before, a weak set of runners was closed at exit, and a runner freed before then (`hermit check`'s probe,
  `hermit eval` once it returned) left its drivers up for stream.idle_s.
- The docs say what a resumed `hermit train` does to a stream under way (its remaining steps in that epoch end
  stream_order, and the stream starts over at its first step's next rollout), and what an Evolver's run_agent of a
  stream's first step does once the Trainer's pass of it finished: it starts a pass the next epoch inherits.
- A request the provider refused for the run's configuration (model_rejected) is not run again (NO_RETRY), and
  NO_RETRY is tested with runs again allowed; nor is a host failure past the trial's staging (host_failed, whose
  session may have run), which the docs now say. The `halted` cause, which nothing gives any more, is gone.
- Codex: a session the provider refused for the run's configuration or bill (a 400, 402 or 404 Codex does not retry,
  an API account's quota) is model_rejected, as the other CLIs' are, never the agent's 0. Its usage limit is read
  from Codex's own notices, never from what its log quotes of the session's work, and a JSON line its log quotes no
  longer ends the record. A session that failed on its own after a reconnect Codex went on from, or whose response
  the provider's content filter ended, is no outage.
- The answer agent's model a CLI reaches: its sessions run with plan_rerun off, so that a session the plan refused
  comes back at once (infra, run again once the plan allows) instead of waiting for the window inside the agent's
  time and scoring as the agent's timeout; its sign-in is checked at startup; its CLI sessions get main's check that
  the user's own secrets are absent (HOME_SECRETS). The runner refuses a run config's own `{cli}` model for the answer
  agent as written, as `hermit check` hands it, as well as the endpoint spec `hermit eval` and `hermit train` hand it,
  whose test builds it with main's endpoint_spec.
- The docs say that `hermit check` builds the runner and reports its startup refusals, and that every run of
  Hermit's agents needs bubblewrap, a baseline's too (the runner cannot tell a run that deploys no adapter), unless
  sandbox_enforce or HA_ADAPTER_SANDBOX_ENFORCE says best_effort.
- The report says when an eval did not finish: no summary.json beside its rows, one that is not of them (its count of
  trials, of failed runs or its mean score differ), or a last row cut off, which is left out. It reads the summary,
  never the files' times, which a copy changes. The docs say that a stopped eval writes no row of the repeat it
  stopped in.
- A plan refusal's hold gets the run's stop, so that a hold that cannot be written waits no longer than the run. The
  docs record that trials racing on one ChatGPT copy for its refresh end the run: the loser's refusal reads as a lost
  sign-in.
- FRAMEWORK_SUPPORT.md names the four private helpers of main that hermit/harbor/ uses, and more candidates: a
  trial's usage when LoginFailed ends the run, the run's own secrets for the answer agent's sandbox, public names for
  those helpers, rows that say who runs them (run_agent's or the Trainer's), the `login: claude` check of `hermit
  train`, RRSI's halt file. The docs no longer say a trial a lost sign-in ended keeps its runs' usage, and
  bind_agent_params is named right.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Review fixes: the tenth post-PR audit

The audit of e19d155 found no high issue, two medium and twelve low, and asked eleven questions. Each is fixed here,
in hermit/harbor/, its docs and its tests, or recorded as a candidate where the fix is main's.

- Pi's and dsh's trials get the backend's developer_role, as Hermit's own sessions do: the spec the config's loading
  keeps drops it (Binding.spec), so the runner takes the backends registry's for a backend it names at the same URL.
  A test compares a trial's provider settings with main's bind_agent_params on Fireworks (developer_role: system).
- `hermit check` and `hermit train` check a Harbor run's acting model as a chat client's, main's rule for an agent it
  does not know: they refuse Claude Code on Anthropic's API, which `hermit eval` runs, and do not check that Codex's
  backend serves the Responses API. The docs say so, and candidate 7 names the cause in main.
- On a login, busy_retries is one count over all of a trial's runs: infra_retries no longer multiplies it (up to 12
  runs by default, where the docs said 4). A plan refusal of the answer agent's model runs the trial again once the
  plan allows, not counted in infra_retries.
- A staging or per-task-context child that failed is the host's failure (staging_failed, run again), not the
  adapter's 0, when this process sees this machine fail any adapter's staging there: a folder it cannot write, less
  than 64 MB free, the strict adapter sandbox not starting. Startup refuses a runner whose bubblewrap cannot start
  that sandbox.
- A trial's launch plan refused for what its adapter is (its tools beside text_only, a dsh server name made of a long
  id) is adapter_failed, scored 0, for a trial and for a stream's step; with no adapter it is still the config's
  error.
- A provider that does not bill the account (a 402, its quota or credit spent) ends the run, as an API account's usage
  limit does. Before, every later trial ended model_rejected.
- acting_agent.settings.env refuses a secret's $NAME inside a value by every rule (AUTH, PASSWD, Harbor's), and a
  secret's value written as it is. `effort: off` gives no effort flag, as on main.
- The answer agent writes answer.json as a new file renamed into place, never through a link the container left
  there. Codex's auth.json is removed from the container once it has been copied back, before a verifier that shares
  the container runs.
- The curated log's top stream is the one the launch plan names. The report adds a note when results.jsonl was
  written after summary.json, as by an eval stopped beside an earlier summary. The runner's finalizer gives each
  driver 2 minutes (CLOSE_STOP_S) before it kills it.
- Tests for each fix above. They also catch four mutations no test caught before: the turn's sign-in copy, the first
  give-up reason, Codex's outage reading, and the report's errors comparison.
- Docs that did not match the code: what `hermit eval` reads of a config made for it alone, the causes never run
  again, only a first step starting a finished stream over, the CLI Evolvers' run_agent, the stream socket's path,
  split files with more than one rollout, Harbor's own usage-limit error, when the `login: claude` warning fires, a
  quoted line in Codex's own form, the relay's sandbox, the deployment record's host paths, and hermit check's probe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Rebase onto main: what Hermes Agent is to a Harbor run

Main has gained Hermes Agent as a CLI Base Agent (#107, 616e818) since this PR's base, e813538. In the rebase, each
conflict keeps both sides: #107's Hermes in the docs' lists and tables of CLIs, and this PR's Harbor beside it. A
Harbor trial does not run Hermes: the runner refuses `acting_agent.cli: hermes` at startup, as it refuses any CLI
with no HermitXXX class, which a new test holds. The docs now say so (the acting agent's row in
docs/framework/task.md, the CHANGELOG entry), and FRAMEWORK_SUPPORT.md counts five other hosts that take
`serve_tools`, Hermes's among them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Round-11 audit: a trial's developer_role, a secret's name, which disk gate held

The round-11 audit of a332854 found no high or medium issue; these are its low ones and what its questions found.

- A Pi or dsh trial's developer_role is the backends registry's only for the backend the registry has at the trial's
  URL (launch._with_role): the run config's `backends:` is not the runner's to read, where Hermit's own sessions take
  it. FRAMEWORK_SUPPORT.md (candidate 14), docs/framework/task.md and the changelog said the trial got what Hermit's
  sessions get; they now say where it does not, and a test holds the URL check, on both of the spec's paths.
- acting_agent.settings.env refuses a value given as it is to a variable a word of whose name is a secret's wherever
  the word stands (HF_TOKEN_READ, OPENAI_API_KEY_2, SECRET_ID), not only at the name's end (launch.SECRET_VAR); a word
  that only holds one (GIT_AUTHOR_NAME, TOKENIZERS_PARALLELISM) is no secret. A test now holds Harbor's part of the
  rule for a `$NAME` inside other text ($OAUTH_CLIENT_ID).
- The verdict of a trial, or of a stream's first step, that a disk gate held back names the gate that held it, the
  host's /tmp or Docker's data root; it named the data root whichever held it.
- Tests for what none caught: the answer agent's relay's 402 whatever its words, the stop a runner's close gives each
  driver (CLOSE_STOP_S), a job folder this process cannot write (the host check after a failed staging child).
- docs/framework/task.md says what the questions found: a login's wait for its plan has no bound, a request the plan
  held back at any time makes its timed-out trial infra, a refused session runs again as often as the plan refuses,
  the host check comes after the staging child, and N hung drivers hold a close up N x 2 minutes. The changelog's
  Codex refusal no longer reads as every 400 or 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Round-12 audit: a stream's next driver, a curated log's links, refusals for good

The audit of 6a79375 found one high and four medium issues and fifteen
low ones. This fixes the high and medium ones, and fourteen of the low
ones (one is in the PR's description); the last is noted there.

- High: a stream's next pass (an eval's next repeat) could meet the
  driver of the pass before in the half second between its last answer
  and its exit, take it for a live one, and lose the whole pass. The
  driver's record now says it is ending before its last answers
  (harborside.driver._mark_ending); StreamClient.running takes neither
  such a driver nor one killed and not yet reaped, and ensure() waits up
  to 30 s for an earlier driver to exit, then kills it, before it starts
  the next.
- Medium: a step whose own folder this machine cannot make now gives its
  stream up (host_failed), so its driver is stopped and the next pass
  starts anew. Before, the driver waited for that step, and the next
  pass ran its last step on the old environment.
- Medium: a step's curated log walks the agent's folders through open
  directory handles and opens each entry with O_NOFOLLOW (curate._files,
  and open_regular for the files at its top). A link that a process the
  agent left running swaps in while the stream's environment stays up is
  never followed, and a file gone meanwhile is left out without an error.
- Medium: Codex's refusals for good are read in its own words: a
  provider's error body Codex passes on as it is, "model is not
  supported", and its plan refusals (a workspace out of credits, a spend
  cap, a plan without Codex). The plan refusals end the run, as a 402
  does.
- Medium: the answer agent's relay reads a 429 for a spent quota
  (OpenAI's insufficient_quota, as its code or its type) as the bill's
  refusal, which ends the run, not as an outage that runs again.
- Low:
  - A relayed Codex session that main's reader leaves a 502 but whose
    stream says it was refused for good is a 400 with Codex's words.
  - The disk gate's verdict names the room for the task's image and for
    other trials' pulls, and a stream's first step keeps room for its
    image until its environment is up.
  - A step waits for its turn over the earlier steps' own budgets.
  - Refused at startup: a benchmark file's {cli} model without a login,
    which the runner cannot bind, and a login in acting_agent.settings.
  - A relative mini-swe-agent settings.config is read beside the params,
    as the runner's other paths are.
  - The texts on the line reader, the secret-name rules and their
    tradeoff, the time a kill takes at exit, the answer agent's effort,
    and a Harbor Claude session's token (on a descriptor).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP

* Dual review: OfficeQA's task builder, keyless backends, a run's spend and stop

- build_tasks.py imports task_text from utils/task.py (the module it named is gone)
- Claude Code on a backend that needs no key gets its placeholder token
- the answer agent's Codex model has web_search off unless given
- a row without an instruction gets Harbor's instruction for its context
- a benchmark's patch is loaded without writing __pycache__ beside it
- a launch's plans folder is the user's only (0700)
- curate opens a reward file and hermit-copy/memory without following links
- an answer trial whose agent sent no request costs 0, not unknown
- a spent quota ends the run even when the agent's time ran out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Haizhong Zheng <hzzheng@umich.edu>
@haizhongzheng
haizhongzheng changed the base branch from harbor-foundation to main November 18, 2026 21:52
@haizhongzheng haizhongzheng left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. Each benchmark comes with its task set locked, a baseline and its paper's method in that protocol, and runs through the commands we already have. We reviewed d8496e4 with two independent reviewers and found nothing that blocks the merge, so the code is unchanged. Since #105 was squash-merged, we merged harbor-foundation (#105's review fixes) and then main into this branch (2484eeb) and retargeted the PR to main. The two conflicts, in CHANGELOG.md and examples/README.md, kept this PR's text.

What we checked: all 26 configs load and pass the runner's startup checks; every SkillOpt and AHE parameter exists in its Evolver; the SkillOpt splits reproduce from the lock with seed 42; no run trains or validates on a row it is tested on; the run sheet's trial counts (1,780, 364, 1,400, 408) match the configs and row files; AlgoTune's 1 - 1/speedup mean gives the harmonic mean; LAB-Bench's patch removes the seed and the verifier's fallback, is idempotent and refuses a task it does not know; and the transfer commands (--adapter with a directory, the README's git archive export) match hermit eval on main.

Noted, not changed

  • SWE-bench's and Terminal-Bench-Science's seed arm deploys hermit/adapter/templates/ahe from the checkout, so a __pycache__ left there by local test runs goes with it.

Tests: test_harbor_examples, AlgoTune's and LAB-Bench's tests, OfficeQA's harbor judge and test_harbor_dataset pass: 161 passed. No trial was run on Docker here; as the PR says, the results tables are empty. CI passed on 2484eeb.

🤖 Generated with Claude Code

@haizhongzheng
haizhongzheng merged commit 17b149f into main Nov 18, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0