Skip to content

feat(vibench): make the agent-session config the default and keep the relay as vibench_legacy_agent.yaml - #5819

Merged
yaoyu-33 merged 16 commits into
mainfrom
yuya/vibench-session-default
Nov 10, 2026
Merged

yaoyu-33 merged 16 commits into
mainfrom
yuya/vibench-session-default

Conversation

@yaoyu-33

@yaoyu-33 yaoyu-33 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

#5701 is merged, and main is merged back in, so the diff against main is only this PR's change: the config switch, the docs that follow it, two new public exports, and the imports that move to them.

What changed and why

#5701 adds the agent-session path for ViBench 1.0 (opencode_agent on single_agent_turn_legacy, with a build sandbox the resources server owns) as an opt-in configs/vibench_sessions.yaml, and keeps configs/vibench.yaml on vibench_agent behind the legacy_agent relay. This PR makes the session path the default, following the naming #5762 uses for the SWE OpenCode configs: the session config takes the plain name, and the relay config is renamed *_legacy_agent.yaml and kept, with a deprecation note.

  • resources_servers/vibench/configs/vibench_sessions.yaml → configs/vibench.yaml (only the header comment changed).
  • configs/vibench.yaml (the vibench_agent relay) → configs/vibench_legacy_agent.yaml, with a deprecation note pointing to vibench.yaml.
  • Citations repointed: resources_servers/vibench/README.md (config list, commands, legacy section), the server docstring, responses_api_agents/vibench_agent/README.md, tests/test_configs.py (the default-config test is now the legacy-config test), and the root README table (regenerated by the hook).
  • Test import: after the main merge, test_public_api_facades.py rejects resources_servers/vibench/tests/test_sessions.py importing LocalProvider from nemo_gym.sandbox.providers.local.provider; it now imports it from nemo_gym.sandbox.
  • Docs follow-up (0efcff6): the agent comment in configs/vibench.yaml cited itself for vibench_agent's settings and now cites configs/vibench_legacy_agent.yaml; the explanation for not loading opencode_agent.yaml (its tools map) no longer held after the main merge brought fix: read OpenCode's tool placeholder in token capture and enforce opencode_agent permissions #5387, which removed that map, so the comment and README now say what the recipe loads and adds; both configs, responses_api_agents/vibench_agent/configs/docker.yaml and the README say which Docker overlay goes with which config; the README Validation section says the default has not been graded yet; vibench_agent's README gets a deprecation banner; and opencode_sandboxed_agent's deprecation warning and README no longer list vibench_agent among setups with no session path, pointing it at configs/vibench.yaml instead.
  • Review fixes (9f616b9): configs/vibench.yaml and the README said the session recipe keeps "no subagents" from the legacy recipe, but the legacy recipe allows webfetch, websearch, task and skill; both now list the four denials as a difference. vibench_agent's README said only OpenSandbox implements serialize()/connect(); Docker, Apptainer and E2B do too, and the vibench README now names the same providers. nemo_gym.core now exports PROVIDER_REQUEST_FAILED and nemo_gym.sandbox exports sandbox_failure, so the vibench server and its tests import both from the public API instead of submodules (sandbox.failures was already loaded by the package's eager imports, so test_public_api_facades.py lists it).
  • Merge of main: feat(vibench): run OpenCode through agent sessions #5701's branch conflicted with main after fix(vibench): read ViBench 1.0 from v1/ in vibench-public 2.0 #5778 was squash-merged. In app.py I kept feat(vibench): run OpenCode through agent sessions #5701's _resolve_artifact, which no longer uses main's _artifact_root property (that property only served the old _resolve_artifact). In the README I kept feat(vibench): run OpenCode through agent sessions #5701's text, plus main's "This environment covers ViBench 1.0." sentence.
  • Second merge of main (c4923b6): main has feat(vibench): run OpenCode through agent sessions #5701 as one squashed commit, so the files this branch shares with feat(vibench): run OpenCode through agent sessions #5701 conflicted. Each is resolved to this branch's change on top of feat(vibench): run OpenCode through agent sessions #5701's final head, so the merged tree equals feat(vibench): run OpenCode through agent sessions #5701's head merged with this branch plus main's later commits. configs/vibench_sessions.yaml, which the squash adds back, stays removed. The merge also brings feat(vibench): run OpenCode through agent sessions #5701's last test fix: since feat(sandbox): instrument file transfers #4934, AsyncSandbox.start() delivers the PRD through upload(), so the two setup-failure tests fail only the asset uploads.
  • Public-API imports (a2403c9): with sandbox_failure and PROVIDER_REQUEST_FAILED exported, test_public_api_facades.py rejects the submodule imports that main has since added in pi_sandboxed_agent (app and tests) and opencode_sandboxed_agent; they now import from nemo_gym.sandbox and nemo_gym.core.

vibench_agent itself is not removed; the legacy config keeps it runnable until the migration retires it.

Issue

No public issue. This is the part of the ViBench migration that #5701 left for later ("making the session path the default").

Compatibility and benchmark-result impact

  • gym env start --config resources_servers/vibench/configs/vibench.yaml now runs opencode_agent with a resources-owned build sandbox, not vibench_agent. Runs that need the relay use configs/vibench_legacy_agent.yaml. feat(vibench): run OpenCode through agent sessions #5701's migration table lists the key moves (vibench_opencode_agent.responses_api_agents.vibench_agent.* → ...opencode_agent.* or the resources server's sandbox_config).

  • Switch the overlay too. With Docker, configs/vibench.yaml takes resources_servers/vibench/configs/docker.yaml; the old pairing with responses_api_agents/vibench_agent/configs/docker.yaml still validates, but the borrowed sandbox then gets a loopback model URL and OpenCode cannot reach the model. With OpenSandbox, use ++use_absolute_ip=true instead of vibench_agent's sandbox_model_base_url.

  • Old overrides: ++vibench_opencode_agent.responses_api_agents.vibench_agent.* now fails at startup as an almost-server error (vibench_agent -> entrypoint: Field required), and artifact_dir / VIBENCH_ARTIFACT_DIR are ignored by the default config.

  • The default sets allowed_agents: [opencode_agent], so pairing another harness with it now needs --allow-unsupported-pairing; the legacy config sets none.

  • Benchmark results: the README's graded numbers (16/16 plans, mean 0.785) come from the legacy relay path. The default session path has not been graded end to end, so do not compare its scores with that table.

  • The two paths differ in output budget (32,768 per call / 229,376 context vs. the whole 262,144 window), command deny-list, and tools: the default denies webfetch, websearch, task (subagents) and skill, which the legacy recipe allows. Scores across the switch are not one measurement. feat(vibench): run OpenCode through agent sessions #5701's description has the details.

  • Library API: nemo_gym.core.PROVIDER_REQUEST_FAILED and nemo_gym.sandbox.sandbox_failure are new public exports. This is additive; the submodule paths still work.

Validation

  • At a2403c9, on Linux: resources_servers/vibench/tests 110 passed, 3 skipped (jinja2 rendering); tests/unit_tests/test_public_api.py, test_public_api_facades.py and test_import_linter_coverage.py 974 passed; opencode_sandboxed_agent 169 passed, 2 skipped; pi_sandboxed_agent 62 passed. gym env validate --strict (with openai_model.yaml) valid for vibench.yaml, vibench.yaml + resources_servers/vibench/configs/docker.yaml, vibench_legacy_agent.yaml, and vibench_legacy_agent.yaml + responses_api_agents/vibench_agent/configs/docker.yaml. pre-commit run --from-ref origin/main --to-ref HEAD: passed.

  • At 9f616b9: tests/unit_tests/test_public_api.py, test_public_api_facades.py and resources_servers/vibench/tests on macOS: 1054 passed, and the same 8 test_sessions.py harvest tests fail as at feat(vibench): run OpenCode through agent sessions #5701's head (local provider tar). opencode_sandboxed_agent tests and test_import_linter_coverage.py pass. gym env validate --strict (with openai_model.yaml) valid for vibench.yaml, vibench.yaml + resources_servers/vibench/configs/docker.yaml, and vibench_legacy_agent.yaml. pre-commit run on the changed files: passed.

  • pytest resources_servers/vibench/tests on Linux at a6de05c: 109 passed, 3 skipped (jinja2 rendering). The one failure in that run was a test that needs responses_api_agents/opencode_agent/configs/permissions/default.yaml, which the trimmed copy I ran from did not include. On macOS, tests/test_configs.py and tests/test_app.py pass in full (54). The same 8 test_sessions.py harvest tests fail on macOS both at feat(vibench): run OpenCode through agent sessions #5701's head and here, from the local provider's tar on macOS, and they pass on Linux.

  • gym env validate on configs/vibench.yaml and configs/vibench_legacy_agent.yaml: valid.

  • At 0efcff6: gym env validate --strict (with openai_model.yaml) valid for vibench.yaml, vibench.yaml + resources_servers/vibench/configs/docker.yaml, vibench_legacy_agent.yaml, and vibench_legacy_agent.yaml + responses_api_agents/vibench_agent/configs/docker.yaml. On macOS resources_servers/vibench/tests: 105 passed, and the same 8 test_sessions.py harvest tests fail as at feat(vibench): run OpenCode through agent sessions #5701's head (local provider tar). opencode_sandboxed_agent deprecation-warning tests: 2 passed. pre-commit run on the changed files: passed.

  • pre-commit run on the changed files: passed after the hook regenerated the root README table.

Rollouts

N/A for this PR's own change: it renames config files and moves no settings. The session recipe's real run (seed, build and harvest on OpenSandbox with a Nemotron model) is in #5701; grading needs a Docker Compose host and has not been run on the session path. A pairing run of the new default with grading is still pending. It needs a Docker host with docker-compose, a ViBench v2.0.7 checkout (v1/ synced, .env with grader keys), and the app-bench-base image:

export VIBENCH_REPO_ROOT=~/vibench VIBENCH_ENV_FILE=~/vibench/v1/.env
gym env start \
    --config resources_servers/vibench/configs/vibench.yaml \
    --config resources_servers/vibench/configs/docker.yaml \
    --model-type openai_model \
    ++policy_base_url=<url> ++policy_api_key=<key> ++policy_model_name=<model>
# second terminal
gym eval run --no-serve --agent vibench_opencode_agent \
    --input resources_servers/vibench/data/example.jsonl \
    --output results/vibench_rollouts.jsonl --limit 1 --num-repeats 1

🤖 Generated with Claude Code

weijiac0619 and others added 11 commits November 5, 2026 14:03
Move ViBench off the legacy_agent /run relay onto the
single_agent_turn_legacy Environment Server and opencode_agent.

The resources server now starts the build sandbox at seed (PRD at
/app/prd.txt, assets under /app/assets), lends it to the agent, and at
verify tars /app, downloads it, stops the sandbox and grades the copy
with ViBench's scripts as before. Close stops a sandbox verify did not,
removes the copy and fences late seeds. A verify without a live session
is a masked session_lost sample. A provider failure while harvesting is
masked with its failure kind and keeps the sandbox, so a resent verify
can harvest again; a missing app directory or a fatal tar error is a
build failure, and files that changed while tar read them are not.

The agent loads opencode_agent's command deny-list but not
opencode_agent.yaml, whose tools map would cancel the denials under
OpenCode 1.17.11; web, subagent and skill tools are denied through
permission. The Docker overlay scopes use_absolute_ip to model servers.

Remove responses_api_agents/vibench_agent, whose only user was ViBench,
and move its Docker provider overlay to resources_servers/vibench.

Read ViBench 1.0 from vibench-public's v1/ layout (v1/prds, v1/.venv),
keeping the old layout working, and regenerate example.jsonl from tag
v2.0.7 (prompts unchanged, paths gain the v1/ prefix).

Set the OpenCode output budget to 32,768 tokens with a 229,376-token
context window: the previous whole-window budget is refused by vLLM.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
Restore responses_api_agents/vibench_agent and its mentions as on main, so
the legacy_agent relay keeps working beside the agent-session path, which
stays the documented default.

The resources server serves both: a legacy seed gets the PRD text and asset
directories and starts no sandbox, and a verify that names artifact_path
grades the tarball from artifact_dir as before. The legacy recipe moves to
configs/vibench_agent.yaml.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
vibench-public moved ViBench 1.0 under v1/ when ViBench 2.0 landed: the
apps are in v1/prds/ and the 1.0 project (venv, .env) in v1/, while
_harness/ stays at the root. prepare.py looked for prds/ at the root and
stopped on a current checkout.

prepare.py now finds the apps in v1/prds/, or prds/ for a checkout from
before 2.0, and looks for ViBench's interpreter in v1/.venv, then .venv.
Row paths stay relative to the checkout root, so the resources server
and vibench_agent are unchanged. example.jsonl is regenerated from tag
v2.0.7 (only the paths change), example_rollouts.jsonl gets the same
path update, and the README setup follows the new layout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
configs/vibench.yaml is main's legacy relay recipe again, unchanged, so
existing runs keep their harness and budgets; the session path moves to
configs/vibench_sessions.yaml. vibench_agent's README is back to main's.
The default switches, and vibench_agent goes, only after both paths are
graded on the same tasks.

verify now holds the session's lock while it harvests and copies the
tarball into its own work dir, then grades outside the lock. Before, two
verifies could tar into the same remote file and download over the same
copy, and a close could remove that copy mid-unpack, which graded as a
build failure. New tests cover a close during verify and two verifies at
once. example_rollouts.jsonl keeps vibench_agent's artifact_path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
Bring in the v1/ layout fix, now its own PR, so this PR's diff shows only
the session work. This branch already carried the same changes; the
README keeps this branch's text, which covers the same layout notes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
The resources server looked for ViBench's interpreter only in the checkout root's
.venv, while the v1 setup puts it in v1/.venv, so the server fell back to Gym's
own Python. It now checks v1/.venv first, then .venv, as prepare.py does.

The README names the full assets path in Anti-cheat and lists, under P0
limitations, that grading has not been re-run on v2.0.7.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
_harvest_app stopped the sandbox once the app was out, and a failed stop raised
through verify as a 500, so a rollout whose tarball was already harvested lost
its grade. The failure is now logged and the sandbox stays on the session for
close to stop, which raises if that stop fails too, so the caller can retry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
…default

Signed-off-by: yaoyu-33 <[email protected]>

# Conflicts:
#	resources_servers/vibench/README.md
#	resources_servers/vibench/app.py
… relay as vibench_legacy_agent.yaml

configs/vibench.yaml now holds the session recipe (opencode_agent through
single_agent_turn_legacy, with the build sandbox the resources server owns), which was
configs/vibench_sessions.yaml. The vibench_agent relay recipe moves to
configs/vibench_legacy_agent.yaml with a deprecation note. Every citation is repointed:
both READMEs, the server docstring, the config tests and the root README table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Nov 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@yaoyu-33

yaoyu-33 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test a6de05c

@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 labels Nov 8, 2026
main now requires code outside nemo_gym to import exported names from each
package's public API; this test reached into nemo_gym.sandbox.providers.local.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
@yaoyu-33

yaoyu-33 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 53dad36

… switch

- configs/vibench.yaml: the agent comment cited configs/vibench.yaml (itself) for vibench_agent's
  settings; it now cites configs/vibench_legacy_agent.yaml, and "the previous recipe" / "as before"
  name the legacy recipe.
- configs/vibench.yaml and the README explained skipping opencode_agent.yaml by its `tools` map. The
  main merge brought #5387, which removed that map and made the deny-list deny the web and skill tools,
  so that reason no longer holds; the comment now says what the recipe loads and adds (`task: deny`).
- The old Docker command paired configs/vibench.yaml with vibench_agent's docker.yaml. That overlay
  still validates with the new default but hands the borrowed sandbox a loopback model URL. The default
  config, the legacy config, that overlay and the README now say which overlay goes with which config.
- README Validation: say the default session path has not been graded end to end yet.
- vibench_agent README: deprecation banner naming configs/vibench.yaml.
- opencode_sandboxed_agent's deprecation warning and README listed vibench_agent among setups with no
  session path; they now point it at configs/vibench.yaml (the test still finds "vibench_agent").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
@yaoyu-33

yaoyu-33 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0efcff6

…m the public API

- configs/vibench.yaml and the README said the session recipe keeps "no subagents" from the
  legacy recipe, but the legacy recipe allows webfetch, websearch, task and skill. Both now
  list the four denials as a difference from the legacy path.
- vibench_agent's README said only OpenSandbox implements serialize()/connect(); Docker,
  Apptainer and E2B do too, and the session path relies on that. The vibench README lists
  the same providers.
- Export PROVIDER_REQUEST_FAILED from nemo_gym.core and sandbox_failure from nemo_gym.sandbox,
  so the vibench server and its tests import them from the public API. sandbox.failures was
  already loaded by the package's eager imports, so the lazy-load test lists it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
@yaoyu-33

yaoyu-33 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 9f616b9

weijiac0619 and others added 2 commits November 10, 2026 11:18
main now has #5701 as one squashed commit, so its files conflicted with
the branch's own copy of #5701's history. Each conflict is resolved to
the branch's change applied on top of #5701's final head; the result
equals that head merged with this branch, plus main's later commits.
configs/vibench_sessions.yaml, which main adds and this branch renamed
to configs/vibench.yaml, stays removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
…the public API

This branch exports both names, so test_public_api_facades.py rejects the
submodule imports that main has since added in pi_sandboxed_agent and
opencode_sandboxed_agent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
@weijiac0619

Copy link
Copy Markdown
Contributor

/ok to test a2403c9

@yaoyu-33
yaoyu-33 enabled auto-merge November 10, 2026 20:42
@yaoyu-33
yaoyu-33 added this pull request to the merge queue Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42898285441

@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 — one validation RISK.

The config migration, retained relay recipe, and public export/import changes are consistent in the inspected source. The new default still needs a representative model rollout that reaches real grading, as detailed inline.

I reviewed all 17 changed paths and their directly affected routing, sandbox, and public API contracts. This was a static review; I couldn't execute tests or rollouts.

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

scale is not saturated. `data/example_rollouts.jsonl` holds this run, with its task paths
updated to the `v1/` layout.

The default session path (`configs/vibench.yaml`) has been run through seed, build and harvest

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.

RISK — Could you attach one representative model rollout through grading before making this path the default? The default recipe now routes ordinary ViBench runs through agent sessions, but this paragraph and the PR description stop the real-run evidence at harvest. The graded 16/16 plans exercised the legacy relay. This leaves the default's complete agent → harvest → fresh-compose grading path unvalidated, rather than demonstrating a runtime defect. The required smoke-rollout rule requires inspecting both agent and verifier behavior for behavior-changing environment work.

Correction: Run the documented default commands on a prepared Docker/docker-compose host. Record the model, provider, ViBench revision, rollout artifact, reward, plan counts, and cleanup result in the validation evidence. No verifier rewrite or full reward-profile sweep is needed for this request.

Proposed acceptance: For one representative task such as notes, inspect a model-generated runnable app and confirm that all three plans reach real grader scorecards, the rollout isn't masked by an infrastructure failure, and the episode releases its build sandbox. A legitimate low score is acceptable; matching the legacy score isn't required.

Preserve: Keep verified: false, the existing table labeled as legacy evidence, and the documented budget/tool differences. Retain the config-test assertions that the default denies all four web/subagent/skill tools while retaining the command deny-list, and that the legacy agent and resources server share artifact_dir.

Merged via the queue into main with commit 82d1606 Nov 10, 2026
70 checks passed
@yaoyu-33
yaoyu-33 deleted the yuya/vibench-session-default branch November 10, 2026 20:58
yfw added a commit that referenced this pull request Nov 10, 2026
Main 5365700. One conflict, in the README environment table: main's #5819
renamed the second Vibench row to vibench_legacy_agent.yaml. Kept main's rows
and this PR's Visual Coding Opencode row; scripts/update_env_list.py gives the
same table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>

This branch was previously deployed

1 inactive deployment
public — a2403c9e Deployed Nov 10, 2026 by copy-pr-bot[bot] via release / finalize / notify #11568
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 feature New capabilities, enhancements, or enablement work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants