Skip to content

feat(benchmarks): add OpenCode on Terminal-Bench 4.1 and Hermes on DeepSWE - #6724

Draft
giuliolovisotto wants to merge 9 commits into
glovisotto/nooa-image-partsfrom
glovisotto/harness-swap-configs
Draft

giuliolovisotto wants to merge 9 commits into
glovisotto/nooa-image-partsfrom
glovisotto/harness-swap-configs

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds terminal_bench_4/opencode: Terminal-Bench 4.1 with OpenCode agent sessions on the Harbor environment server, next to terminal_bench_4/miniswe.

  • benchmarks/terminal_bench_4/opencode.yaml (with opencode/manifest.yaml). It names the same Harbor target as miniswe.yaml and composes opencode_agent:
    • timeout: 28800. The shipped 10,800 s would end a run five hours before the tasks' 8-hour agent budget does. tb4_agent_max_timeout_sec caps it for smoke runs, as in miniswe.yaml.
    • sandbox_ripgrep_download: true. retro-console-soc runs on Fedora, where session setup cannot install ripgrep (it uses apt-get or apk), so OpenCode downloads it on first use there. The Debian and Ubuntu images still get it from their package index.
    • The episode bound (54,000 s) and the harness setup allowance (900 s) of miniswe.yaml.
  • benchmarks/terminal_bench_4/root_image_tasks.txt: the 63 tasks whose image runs as root, for task_ids_fpath. OpenCode installs itself in the task sandbox with the image's package manager, which it cannot do in the three tasks that run as a non-root user (fp8-rmsnorm-gemm, risk-scorer-replay, rs-archive-clone). The list lets several harnesses run on one task set.
  • README: the new profile, the three tasks it cannot start on, and that it has no step limit, so its scores are not comparable with the Artificial Analysis settings of terminal_bench_4/miniswe.

Without this config, --agent-type opencode_agent on terminal_bench_4/miniswe runs OpenCode with its shipped 3-hour limit and fails setup on retro-console-soc.

No issue: this adds a benchmark config and changes no existing one.

It also adds deepswe/hermes: DeepSWE v1.1 with Hermes agent sessions, next to deepswe/opencode.

  • benchmarks/deepswe/hermes.yaml (with hermes/manifest.yaml). It composes hermes_agent with the DeepSWE resources server and single_agent_turn_legacy, as opencode.yaml does, and admits hermes_agent on its resources server instance:
    • sandbox_runner_timeout_seconds: 10800 and default_episode_timeout_seconds: 18000, the run limit and episode bound of deepswe/opencode.
    • context_length: 262144, the window opencode_agent declares. Unset, Hermes cannot probe the Gym model server and assumes 256,000 tokens.
    • max_turns: 1000. With Hermes's default of 90 model calls, runs on these tasks stop at the step limit within minutes. deepswe/opencode has no step limit; give it opencode_config.agent.build.steps: 1000 to compare the two under the same limit.
    • terminal_timeout: 180, Hermes's own default; hermes_agent.yaml lowers it to 60. Every toolset stays enabled.
    • concurrency: 1024, as deepswe/opencode: an admitted episode already holds its agent sandbox.
    • The Agent Server stages Hermes's runtime into the agent sandbox, so the no-network sandbox needs no mounted binary.
  • resources_servers/deepswe/README.md: a "Run Hermes rollouts" section.

More harness configs for these benchmarks may be added to this branch while it is a draft.

Validation

  • harbor_benchmark() on the new config returns target terminal_bench_4, harness opencode_agent, and the same benchmark_settings as terminal_bench_4/miniswe.
  • gym env resolve of a run config for this target with opencode_agent, the Harbor environment server, the OpenSandbox provider and this file: the run's agent instance resolves timeout: 28800 and sandbox_ripgrep_download: true; the environment server instance resolves default_episode_timeout_seconds: 54000 and harness_setup_allowance_s: 900.
  • The session installer (install_opencode_runtime.sh, unchanged) run by hand in two task images:
    • risk-scorer-replay, as its default user nobody: stops with "needs curl ... automatic installation requires root".
    • fedora:42 at the digest retro-console-soc builds from, as root: stops on ripgrep by default, passes with the ripgrep download allowed.
  • pre-commit run on the staged files: the hooks that apply to them pass.
  • gym env resolve of benchmarks/deepswe/hermes.yaml with the OpenSandbox provider and a vLLM model server: the agent instance resolves sandbox_runner_timeout_seconds: 10800, max_turns: 1000, terminal_timeout: 180, context_length: 262144, enabled_toolsets: null and concurrency: 1024; the resources server instance resolves allowed_agents: [hermes_agent] and enforce_agent_no_network: true; the environment server instance resolves default_episode_timeout_seconds: 18000.
  • Not run: the unit test suite and pre-commit run --all-files.

Rollouts

None yet, which is why this is a draft. To add before review: rollouts of terminal_bench_4/opencode that include retro-console-soc and a Compose task, and rollouts of deepswe/hermes.

Compatibility and benchmark impact

None for existing configs. terminal_bench_4/opencode and deepswe/hermes are new and marked experimental.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Documentation added or updated, or N/A with justification.
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format checks pass).
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Nov 24, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@giuliolovisotto
giuliolovisotto marked this pull request as ready for review November 24, 2026 16:58
@giuliolovisotto
giuliolovisotto marked this pull request as draft November 24, 2026 16:58
@svcnvidia-nemo-ci svcnvidia-nemo-ci added feature New capabilities, enhancements, or enablement work area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers risk:mid Autobot PR risk: mid labels Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SHIP WITH CARE

I reviewed all four changed files and their connected configuration, session, task-selection and catalog paths. I found no demonstrated runtime BLOCKER. The required real-rollout evidence is still missing, and the new manifest needs its selection metadata completed.

RISK: Add representative real smoke-rollout evidence

The PR description explicitly says no rollouts have run. The new OpenCode profile changes the execution budget and enables on-demand ripgrep downloads, but configuration resolution and installer-only checks do not show that this pairing completes a model trajectory and reaches official verification. AGENTS.md requires representative real smoke rollouts for behavior-changing agent/environment work. This is an evidence gap affecting the new profile, not a reproduced runtime defect.

Could you attach the promised retro-console-soc and Compose-task rollouts before this leaves draft? Record the model/version, task IDs, exact command/config, trajectory artifacts, verifier outcomes and inspection notes. Acceptance should show usable grep/glob on Fedora, interaction with the Compose dependency, official verification, and cleanup. The model need not solve either task; distinguish model failure from broken setup or infrastructure. Keep the official scoring and task budgets, existing mini-SWE behavior and score-comparability warning unchanged. No full benchmark run or reward-distribution study is requested.

Validation

The review's focused probes ran against the reviewed source in 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:355db96a7829581c6e408d61bd9cc67029f43be2, a successfully built default-branch CI image; no successful head-image build was found.

  • config-runtime-1/probe.py, public-session-probe.py and installer-fallback-probe.py passed. They exercised composed defaults and smoke overrides, task-budget caps, installer failure diagnostics, fake HTTP session plumbing, and borrowed-sandbox close behavior. The real installer accepted the missing-ripgrep fallback flag with a fake cached executable.
  • task-selection-1/probe_task_selection.py and probe_collector.py passed. The file contains 63 unique IDs from the committed 66-task inventory, excluding exactly the documented three. Actual filtering, CLI dispatch and repetition preserved task identity and order; unknown IDs failed closed.
  • Catalog probes passed discovery and non-mutating manifest validation. They also confirmed the five metadata omissions noted inline.

These scratch scripts are under /workspace/review-probes/. I did not independently validate task-image users, real downloads, model trajectories, Compose/GPU execution, observation capture or scoring.

For existing suites, I relied on head CI: lint, component locks, sandbox tests, core shards 0–2 and server shards 0/1/3/5/6 succeeded. Core shard 3, server shards 2/4/7 and LongMT scoring were still running at the last read, so the aggregate was not yet green. Changed-server and session-routing checks were skipped, not passed. No failing check was observed. I did not rerun the full CI suites locally.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

modality: text
licensing: unknown
authors:
- NVIDIA NeMo Gym contributors

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NOTE: Could you complete this new manifest's maintainers, capabilities, domains, primary_metric and requirements fields? All five are absent and parse as None. The new-manifest authoring rule requires them even though the backward-compatible schema permits omission. Users discovering this profile otherwise cannot identify its owner, headline metric or GPU/network needs from the declaration.

Please add actual maintainer logins, the exact aggregate metric key and appropriate taxonomy/requirement values; use unknown only where supported rather than guessing. Keep the existing Harbor target, agent/model wiring and experimental: true. Acceptance: the five fields are explicit and non-placeholder, their requirements match the supported tasks and runtime downloads, and manifest validation and catalog discovery still succeed.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the benchmark-onboarding Self-contained benchmark onboarding label Nov 24, 2026
@giuliolovisotto giuliolovisotto changed the title feat(terminal_bench_4): add an OpenCode benchmark config feat(benchmarks): add OpenCode on Terminal-Bench 4.1 and Hermes on DeepSWE Nov 25, 2026
@giuliolovisotto
giuliolovisotto removed this pull request from stack #6829 November 27, 2026 09:49
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/harness-swap-configs branch from a6f58af to a64c449 Compare November 27, 2026 09:50
@giuliolovisotto
giuliolovisotto changed the base branch from main to glovisotto/hermes-stale-timeout November 27, 2026 09:50
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/harness-swap-configs branch from a64c449 to 8cd5904 Compare November 27, 2026 13:53
@giuliolovisotto
giuliolovisotto removed this pull request from stack #6854 November 27, 2026 13:54
@giuliolovisotto
giuliolovisotto changed the base branch from glovisotto/hermes-stale-timeout to glovisotto/nooa-image-parts November 27, 2026 13:54
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/harness-swap-configs branch from 8cd5904 to c013d0b Compare November 30, 2026 10:53
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/harness-swap-configs branch from c013d0b to 486fc9f Compare November 30, 2026 11:47
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/harness-swap-configs branch from 486fc9f to b682f4f Compare November 30, 2026 11:49
giuliolovisotto and others added 5 commits November 30, 2026 14:49
Add terminal_bench_4/opencode: Terminal-Bench 4.1 with OpenCode agent sessions on the
Harbor environment server, with the episode bound and setup allowance of
terminal_bench_4/miniswe and OpenCode's run limit raised to the tasks' 8-hour agent budget.

Add root_image_tasks.txt, the 63 tasks whose image runs as root, to compare harnesses on
one task set: OpenCode cannot install itself in the three tasks that run as a non-root user.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Set verify_after_agent_error in terminal_bench_4/opencode: an OpenCode run that died while its
sandbox still runs (its own command killed it, or the kernel's OOM kill picked it) is graded as
it stands instead of being retried, as Harbor grades after any agent exit and as
terminal_bench_4/miniswe grades a mini-SWE run that was killed mid-step. Both harnesses then
treat a dead agent the same way when they are compared on the same tasks. A setup failure or a
model endpoint failure is still retried.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Add deepswe/hermes: DeepSWE v1.1 with Hermes agent sessions on the same episode as
deepswe/opencode. The resources server seeds the no-network agent sandbox, Hermes works in it
through an agent session, and the patch is graded in a fresh verifier sandbox. The agent server
stages Hermes's runtime into the sandbox, so the sandbox needs no network.

The run limit (3 hours), the episode bound and the session concurrency are those of
deepswe/opencode, to compare the two harnesses on the same tasks. The step limit is raised to 500
so that the run limit is the bound, as for OpenCode, which has no step limit. Hermes gets its
shell and file toolsets, a declared 262144-token context window and its own 180-second command
timeout.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Run Hermes with its own step limit (90 model calls) and every toolset enabled instead of a
500-step limit and the shell and file toolsets only. With the run limit, episode bound and
context window already aligned with deepswe/opencode, the two harnesses then differ only in what
each one ships with.

Document the recipe next to the OpenCode one in the DeepSWE README.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
… the Harbor entry

batched-eval-parity and lake-temp-glm state their verifier's network restriction on the
verifier's own sandbox ([verifier.environment] allow_internet = false), a placement the Harbor
loader refuses, so a run of the entry stopped with two unloadable tasks. The entry's
dataset.toml now states the same restriction on [verifier], where the loader applies it to the
separate verifier's sandbox, as the terminal_bench_science entry does. The tests still run
offline and all 66 tasks load.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
giuliolovisotto and others added 4 commits November 30, 2026 14:49
Set max_turns far above what the three-hour run limit allows, so the run limit is the only bound
on a Hermes run, as it is for deepswe/opencode, which has no step limit. With Hermes's default of
90 model calls, runs on these tasks stop at the step limit within minutes, and the two harnesses
are then compared under different limits. max_turns accepts no null.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
…_bench_4/opencode

Set agent.build.steps to 1000, high enough that the 8-hour run limit is the bound. A comparison
of harnesses on these tasks then gives each harness the same number
(++tb4_max_steps=1000 for terminal_bench_4/miniswe). From that step on OpenCode 1 asks for a
text answer and still offers the tools, so the limit does not stop a model that keeps calling
them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Replace the out-of-reach max_turns with 1000 model calls: a stated limit that both harnesses can
share (opencode_config.agent.build.steps: 1000 for deepswe/opencode) instead of an arbitrary
large number. It stays well above Hermes's default of 90, which ends runs on these tasks within
minutes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
This reverts commit b188f56. The benchmark config keeps OpenCode's own default, no step
limit; a run that wants one sets opencode_config.agent.build.steps itself, as it sets
++tb4_max_steps for terminal_bench_4/miniswe.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/harness-swap-configs branch from b682f4f to 00a5eae Compare November 30, 2026 13:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers benchmark-onboarding Self-contained benchmark onboarding feature New capabilities, enhancements, or enablement work risk:mid Autobot PR risk: mid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants