Skip to content

feat(agentic_mme): run Agentic-MME with simple_agent and OpenCode through agent sessions - #5720

Merged
yaoyu-33 merged 47 commits into
mainfrom
yifuw/agentic-mme-multi-harness
Nov 16, 2026
Merged

yaoyu-33 merged 47 commits into
mainfrom
yifuw/agentic-mme-multi-harness

Conversation

@yfw

@yfw yfw commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Makes Agentic-MME (#5523, on main) a worked example of one benchmark that several agent harnesses run through the Environment Server, for eval and RL training.

  • Image tools on the resources server. The 14 image tools move from the agent to resources_servers/agentic_mme/image_tools.py. The server serves them over HTTP and MCP, and each reply returns its new image in tool_output_images.
  • Agent sessions. The environment's own agent serves agent sessions (configs/agentic_mme.yaml runs it under single_agent_turn_legacy). Under a session, a failed model call fails the response with its cause, classified as simple_agent's session branch does (a context or request-size refusal, a policy timeout that the model server confirmed, another status), and the response keeps the call's failure report; on /run the behavior is as on main. The agent reports its tool trace in the response's metrics, which the model never sees, and verify moves it into the row with the tool counts and overthink, so a session row has the same fields as a /run row, including each retrieval call's raw, contaminated and cache.
  • Outcome policy. The benchmark's rule (README) is that a model call refused for its context or request size scores 0, and any other failed call is not scored. Under sessions, the agent reports a context or request-size refusal as model_context_limit, and configs/agentic_mme.yaml sets the Environment Server's agent_outcome_policy so that model_context_limit is graded and a 400, 413 or 422 refusal fails ungraded. A serving limit, such as vLLM's per-prompt image limit, or an unsupported parameter therefore does not score 0. The policy applies to every harness of the benchmark (see Compatibility). Verify records a graded failed response as failure_reason: policy_error with the call's message in policy_error, as on /run.
  • Lent sandbox. For OpenCode, the server lends a sandbox with the task images as files (LentSandboxes, feat: images in tool replies, a lent-sandbox helper and OpenCode session limits for multi-harness training #5719). sandbox_network_access sets its egress: opencode.yaml uses model_only (only the model server), and opencode_server_tools.yaml uses model_and_tools (the model server and this server's /mcp). Both OpenCode recipes set image_input: true, so OpenCode passes the images its tools return to the model.
  • Sandbox image. resources_servers/agentic_mme/sandbox_image/Dockerfile builds the OpenCode sandbox: Python with OpenCV, NumPy and Pillow, OpenCode 1.17.11, and OpenCode's plugin dependencies. Without those dependencies, OpenCode tries to install them from npm at each start, and a sandbox with no internet access waits about 70 s for that install to fail. The build checks the archive against the SHA-256 that benchmarks/agentic_if pins, and opencode.yaml sets the same pin.
  • Hosts. A network rule that allows the policy model's host opens every port of that host, and NeMo RL gives that address to every server without its own host. So opencode.yaml sets host: 127.0.0.1 on the head server (it returns the whole config, keys included), the judge, the agent, the resources server and the Environment Server, whose callers all run on the same host. NeMo RL sets the head server's address itself, which wins over the recipe, so under NeMo RL the head server stays on the node's address: do not run opencode.yaml under NeMo RL with real keys until the head server stops returning secrets (opencode_server_tools.yaml turns OpenCode's shell off). opencode_server_tools.yaml also sets the resources server's host back to null, because OpenCode calls its /mcp from the sandbox.
  • Session state. A server that lends a sandbox or serves the image tools refuses a cookie seed with 422, and a malformed typed seed gets 422, as does a task image that cannot be read. A checkpoint retire stops the lent sandbox and drops the workspace, as close does, without close's fence. Image tool calls take the session's lifecycle lock, so a call queued behind close sees its fence, and a call cancelled by a client disconnect keeps the lock until its worker thread finishes. A tool call for a session this server does not hold (never seeded, or lost to a restart or a retired attempt) answers 404 session_lost, and verify masks that session.
  • Judge. The verdict comes from every JSON object in the judge's reply, and objects that disagree are a judge failure, as is a reply with no choices. Judged rows carry a grading record. judge_model is removed: the judge's model server picks the model.
  • Step limit. score_step_limit_answer (default false) scores an answer at a harness's step limit 0, as the environment's own agent scores an episode that runs out of rounds. step_limit_reached shows the share of such rollouts.
  • Deadline and admission. The OpenCode configs set an episode deadline (5400 s) below the lent sandbox's TTL (7200 s), and a test keeps it there. The Environment Server admits 32 episodes at a time, the agent's concurrency, because each seed starts a sandbox. server_tools.yaml also admits 32 at a time, which bounds the image workspaces on the resources server (up to about 192 MB each), and that server runs OpenCV with one thread per call.
  • Data. prepare.py converts the release once and writes all four tracks; prepare_server_tools.py, prepare_opencode.py and prepare_opencode_server_tools.py return their recipe's file, as gym eval prepare requires. Every recipe prepares in the resources server's locked project (prepare_project), which has Pillow and OpenCV. prepare.py also writes task_id at the row's top level, where gym eval plan reads it.

Settings in benchmarks/agentic_mme/:

Config Harness Tools
config.yaml the environment's own agent its own image tools
server_tools.yaml simple_agent the 14 image tools from the resources server
opencode.yaml OpenCode the task images as files in a lent sandbox
opencode_server_tools.yaml OpenCode the 14 image tools over MCP

No issue: this is the worked example for the multi-harness design.

Validation

At this head (the review fixes, then a merge of main 95c841be0):

  • responses_api_agents/agentic_mme_agent tests: 106 passed. New: a 500 with a timed-out report keeps its cause and report, as model_server_queue_timeout when requests waited in the model server's queue at every timeout, and single_agent_turn rebuilds the timeout as the selected cause; a config.yaml rollout collected through the Environment Server that ends on a context-limit refusal after one crop scores 0, is graded, counts the crop and records policy_error.
  • resources_servers/agentic_mme tests: 175 passed (the test that only checked image_input: true was removed after review). New: a graded failed response records policy_error; a tool call for a session the server lost answers 404 and verify masks it.
  • The new tests fail on the previous head.
  • gym env validate --config of all four recipes: valid.
  • tests/unit_tests/benchmarks and test_public_api_facades.py: 1955 passed, 2 failed (two cases of test_super_vllm_launcher.py, which this PR does not touch and which fail the same way on this machine without it).
  • pre-commit run --files on the changed files: passed.
  • After the merge of main: single_agent_turn_legacy tests 54 passed, opencode_agent test_existing_benchmarks.py 15 passed, tests/unit_tests/config/test_global_config.py and test_public_api_facades.py 1242 passed, and scripts/component_locks.py checked 315 projects with 0 failed.
  • Not rerun, because these fixes do not touch what they check: the other opencode_agent tests (922 passed, 23 skipped) and gym eval prepare of all four recipes, from the previous heads. prepare.py itself ran at a67d4e094 for the smokes.

Rollouts. The four-track numbers below predate 5a0d0b396, which changed which failures are graded. After it, the paired comparison covers config.yaml only: main 35.17% against this PR 34.33%, paired difference −0.84 points, standard error 1.26 (comment). Smokes at a67d4e094 (the same code as this head, except the example rollouts): 10 real tasks × 2 repeats for each recipe, with the same hosted vision-language model, the gpt-4o-mini judge and search off. The server_tools.yaml rows set max_output_tokens: 16384, as in the comparison. These smokes check the outcome policy on each track. 20 rollouts are too few to compare scores.

Recipe Rollouts Graded Failed, not graded Masked Correct
server_tools.yaml 20 20 0 0 9
opencode.yaml 20 16 4 0 7
opencode_server_tools.yaml 20 19 1 0 10

Each failed rollout is a refusal from the hosted model, HTTP 400 "Bad Request" (once "Invalid request"), after 26 to 65 tool calls. As in the comparison, the likely cause is the hosted model's limit of 25 images per request. The refusal does not name a context limit, so the outcome policy fails it without a grade, as it does for every harness. No smoke rollout ended on a context-limit refusal, so only the unit test covers the model_context_limit rule here. In both OpenCode smokes, a probe from inside the lent sandbox found the internet blocked and the policy model reachable; the resources server's /mcp was reachable only under opencode_server_tools.yaml.

Before the merge:

  • Eval (418 tasks × 2, hosted vision-language model, search off): the environment's own agent 34.9%, simple_agent with server tools 36.1%, OpenCode with server tools 36.5%, OpenCode with task files 35.2%. A paired difference has a standard error of about 1.5 points.
  • GRPO through the Environment Server with OpenCode and the image tools: with the answer at the step limit scored, the share of rollouts at the limit grew from under 1% to about half within 22 steps; with the default (scored 0), almost none reached it in the first 10 steps.

Compatibility

  • configs/agentic_mme.yaml runs the environment's own agent through agent sessions. Under a session, retrieval.mode=replay is refused, because sessions do not receive the replay list.
  • Under sessions, with this benchmark's outcome policy: an OpenCode rollout that ends on a context overflow (model_context_limit) now scores 0 instead of failing ungraded, as with the environment's own agent. simple_agent reports a context limit as a plain 400, so in server_tools.yaml that rollout now fails ungraded instead of scoring 0. A refused call other than a context limit fails ungraded with every harness.
  • The Environment Server instance is renamed from agentic_mme_agent_environment_server (main) to agentic_mme_environment_server. An override that names the old key adds a second, unused block. data/example_rollouts.jsonl is regenerated through this config: 5 rows from the agent's session routes under agentic_mme_environment_server.
  • A confirmed policy timeout under a session is now model_policy_response_timeout with the model server's report, in place of model_request_error/500 with no report. single_agent_turn's timeout rule retries it by default, as before. When requests waited in the model server's queue at every timeout, it is model_server_queue_timeout, as with simple_agent since fix(failures): a policy timeout on a queueing model server is the server's #5686; the default policy retries it.
  • An image tool call for a session the resources server does not hold answers 404 session_lost in place of 409, and verify masks that session.
  • config.yaml prepares in prepare_project: resources_servers/agentic_mme in place of prepare_dependencies: [pillow].
  • The resources server's judge_model setting is removed. A config that sets it must drop it; the judge's model server picks the model.
  • No other benchmark changes.

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Nov 6, 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.

@yfw yfw added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers feature New capabilities, enhancements, or enablement work labels Nov 6, 2026
yfw pushed a commit that referenced this pull request Nov 6, 2026
The opencode_agent session path rejected any input_image part with a 422,
and its model entry declared no image input.
OpenCode omits every image from model requests for a model without image input,
including images its read tool returns, while still reporting the read as successful.

A session now accepts base64 data-URI input_image parts in the user task.
The adapter decodes them with nemo_gym.media_utils, uploads them into the session directory,
and passes each one to `opencode run --file`.
The session model entry declares image input, so images the read tool returns reach the model.
Media outside the user task and image URLs are still rejected with a 422.

Ported onto main 792fa14 for the Agentic-MME stack (#5720): main's session input now also takes
request sampling, and test_unset_extensions_keep_setup_activation_and_capture_unchanged now expects the
image options in the model entry. The #4922 test reads the staged activation through params().

Signed-off-by: Ananth Subramaniam <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
@yfw
yfw force-pushed the yifuw/agentic-mme-multi-harness branch from c8711eb to d065813 Compare November 6, 2026 07:34
@yfw
yfw changed the base branch from main to yifuw/multi-harness-core November 7, 2026 02:00
@yfw

yfw commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 4d66616

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

@yfw

yfw commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 67d5907

@yfw

yfw commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 006eeca

@yfw

yfw commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 41f8bb9

@yfw

yfw commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test dae1d0c

yfw and others added 4 commits November 13, 2026 00:17
…cipes

The lent sandbox's network rule opens every port of the policy model's host,
and a launcher's default_host also becomes the head server's address. The
head server returns the whole config, keys included, without authentication,
so sandbox code could read the credentials. opencode.yaml now sets
head_server.host 127.0.0.1, which opencode_server_tools.yaml inherits; the
policy model and, with server tools, the resources server keep the reachable
address. NeMo RL sets head_server in its own initial config, which wins over
the recipe, so under NeMo RL the head server stays on the node's address; the
README says so.

Tests: the launcher-host test checks the head server, and a new test checks it
for both recipes with and without absolute_ip_server_types.

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

On /run, the Agentic-MME agent scores a model call refused for its context or
request size as 0 and raises any other failed call into the failures sidecar.
Under an agent session it reported every refusal as model_request_error with
its status, and the Environment Server's default policy grades a 400, so a
serving limit (vLLM's per-prompt image limit) or an unsupported parameter
scored 0.

The agent now reports a context or request-size refusal as
model_context_limit, and configs/agentic_mme.yaml sets the Environment
Server's agent_outcome_policy: model_context_limit is graded, and 400, 413 and
422 fail ungraded. The policy applies to every harness of the benchmark:
OpenCode already reports a context overflow as model_context_limit, so it now
scores 0 there too; simple_agent reports a context limit as a plain 400, so in
server_tools.yaml that rollout fails ungraded. The benchmark README says so.

Tests: a session drives a crop and then a context-limit 400 and 413, an
image-limit 400, an unsupported-parameter 400, a 503 and a 401, and checks the
reported outcome, the kept tool work and the action under the benchmark's
policy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
gym eval prepare requires prepare() to return the dataset's jsonl_fpath, but
prepare.py returns the atomic track's file, so the three new recipes failed
with ConfigError. prepare_server_tools.py, prepare_opencode.py and
prepare_opencode_server_tools.py run the shared conversion and return their
track's file, and each recipe points prepare_script at its own.

prepare.py also builds the server-tools rows from the image tools, which import
OpenCV, and the recipes declared no preparation dependencies. config.yaml now
sets prepare_project: resources_servers/agentic_mme in place of
prepare_dependencies: [pillow], and each recipe's benchmark dataset sets it.

Tests: for all four recipes, the preparer returns the dataset's jsonl_fpath and
the dataset sets prepare_project. Checked: gym eval prepare of all four recipes
on a one-task local release finishes in the locked project's environment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…e, refuse unreadable images

- Retire. The server keeps its own sessions, so the inherited
  retire_session_state did nothing, and a retired attempt kept its workspace
  and lent sandbox. It now stops the sandbox and drops the workspace under the
  session lock, without close's fence; a failed stop keeps both for a retry.
- Tool calls. A call checked the fence before it waited on its own lock, which
  close did not take, so a call queued behind close changed the dropped
  workspace and returned success. A call now takes the session's lifecycle
  lock and checks the fence and the session under it. A client disconnect
  cancelled the await but not the worker thread, so the next call could run
  beside it; the await now runs in a shielded anyio cancel scope, so the lock
  is held until the worker finishes.
- Seed. A task image that exists but cannot be read raised a 500, which the
  Environment Server retries with the same input; it is now a 422.

Tests: retire with a failing first stop; close against a running and a queued
call; a call cancelled through an anyio cancel scope; an unreadable image. All
four fail on the old code.

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

yfw commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test b6c97ef

@yaoyu-33 yaoyu-33 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.

One inline compatibility finding from source review at b6c97ef. Independently cross-checked; no runtime tests or model rollouts were run.

…ions

The default recipe runs the agent through agent sessions, and the session
path dropped the tool trace: the Environment Server sends verify only the
task data and the response, and the model's tool outputs leave out each
retrieval call's provider answer, leak-guard count and cache outcome. A
collected row therefore lost tool_trace, the counts and overthink.

The agent now puts the trace in response.metrics, which the model never
sees. Verify moves it into the result and derives the counts and
overthink from it, so /run and a session give the same fields, and the
row stores the trace once. /run takes them from verify instead of
computing them itself.

A test collects a rollout of the default recipe through collection, the
single-agent-turn Environment Server and the agent's session routes, with
a live search result, and checks the trace, its raw, contaminated and
cache keys, and the counts. It fails on the previous head.

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

yfw commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 385c6f6

Brings in main up to efd41fa, so the lock-freshness check compares
this branch's locks against current main. No conflicts.

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

yfw commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 5ee1e5d

@yfw

yfw commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Reward comparison: main against this PR

The review asked for a reward comparison between the base and this PR, because the default recipe moves from the agent's /run to agent sessions. The rewards match within noise.

Setup. The default recipe (benchmarks/agentic_mme/config.yaml) at main 370f79ad8 (the legacy_agent relay to the agent's /run) and at this PR's 385c6f629 (an agent session under single_agent_turn_legacy). The two commits differ only by this PR. Both runs used the same input file: 418 tasks × 2 repeats. The policy was a hosted vision-language model, the judge was gpt-4o-mini, and retrieval was off. Each row set max_output_tokens: 16384. The two runs ran at the same time.

main (/run) this PR (agent session)
Rollouts 836 836
Graded 835 834
Failed, not graded 1 2
Masked 0 0
Mean reward, all rollouts (a failed rollout counts 0) 35.17% 34.33%
Mean reward, graded rollouts 35.21% 34.41%
Replies cut at max_output_tokens (incomplete_response) 118 108
Tool calls per rollout 2.27 2.34
Tokens per rollout 32,675 33,817

Paired difference over the 418 tasks (this PR minus main, using the mean of each task's two repeats): −0.84 points, standard error 1.26. The difference is smaller than one standard error.

Rollouts whose result type changed (3 tasks). Each failure is the same refusal from the hosted model: HTTP 400 "Bad Request". The recipe sets no round or tool-call limit. The PR's two failures came after 25 and 27 tool calls, so the likely cause is the hosted model's limit of 25 images per request.

  • Task 60: on main, rollout 1 failed (its failure row does not record its tool calls). On this PR, both rollouts were graded (8 and 17 tool calls), and both scored 0.
  • Task 96: on this PR, rollout 1 failed after 25 tool calls. On main, both rollouts were graded (5 and 3 tool calls), and both scored 0.
  • Task 109: on this PR, rollout 0 failed after 27 tool calls. On main, both rollouts were graded (12 and 19 tool calls), and both scored 0.

No rollout of these three tasks scored on either side, so the three failures do not change the paired difference.

Two differences in behavior seen in the runs.

  • On main, the 400 made the agent's /run return 500. After its retries, the collector stopped the whole run at 318 of 836 rollouts. Main finished only after a second command with --resume and +route_failures_to_sidecar=true. The resumed run kept the 318 rollouts and did not retry the failed one. On this PR, the outcome policy fails that rollout without a grade, and the run goes on with no extra flags.
  • Every row of this PR's run has tool_trace and the tool counts (the fix for the session-trace thread above). The two failed rollouts keep their trace in the metrics of their partial response, with 25 and 27 entries.

Not measured: live retrieval, and the other three recipes (server_tools.yaml, opencode.yaml, opencode_server_tools.yaml). This comparison covers only the default recipe.

@yaoyu-33 yaoyu-33 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.

Team review at 5ee1e5dad1. Thanks for the careful rounds here: every earlier "Fixed in …" thread holds at this head. That covers the session 400s vs context limit, each recipe's prepare output and dependencies, retire releasing state, tool calls vs close and cancellation, unreadable images getting 422, and the tool trace under sessions.

Verdict: SHIP WITH CARE. No blockers. There are three risks: score comparability of the server_tools track, unbounded workspaces on that track, and the head-server key exposure under NeMo RL, which I answered in its existing thread. The inline notes are smaller follow-ups. Each issue and ask is inline.

On the question of where PolicyCallError belongs: see the inline comment on its definition. Short version: keep it local, build it on AgentOutcome, and leave a shared "failed response with an AgentOutcome" helper to a follow-up PR across agents.

Context:

  • CI at this head: everything required passes. Only the non-blocking Environment Server compliance check fails.
  • The rollout numbers in the description predate 5a0d0b396, which changed which failures are graded. The paired comparison after it covers config.yaml only. Real smokes of server_tools.yaml, opencode.yaml and opencode_server_tools.yaml at this head would confirm the outcome policy on those tracks.
  • Not verified here: no tests or model rollouts were run for this review; it is a source review against current main (f0c2feb319).

Comment thread resources_servers/agentic_mme/app.py Resolved
yfw and others added 5 commits November 16, 2026 09:54
…nder sessions

- A tool call for a session this server does not hold (never seeded, or lost to
  a restart or a retired attempt) raises ResourcesSessionLostError (404,
  session_lost) instead of 409, which harnesses passed to the model as an
  ordinary tool error. The session middleware gives every request an ID, so the
  two cases look alike; this follows automationbench, enterpriseops_gym and
  gdpval.
- With serve_image_tools on, verify masks a session this server does not hold
  (lost_session_verification), as for a closed session.
- verify records a failed response (a context-limit refusal that the outcome
  policy grades) as failure_reason "policy_error" with the harness's message in
  policy_error, as the agent's /run does.
- serve_image_tools sets cv2.setNumThreads(1), as the agent does, since the
  tools run in to_thread workers.

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

ServerClient.post returns a non-ok reply without raising, so the
ClientResponseError branch never ran and a confirmed policy timeout was
reported as model_request_error/500 without its failure report.

- The agent now calls raise_for_status on each model reply. A refusal is
  classified from the error: model_context_limit for a context or request-size
  refusal, model_policy_response_timeout when the model server's report shows
  every attempt timed out, model_request_error with the status for another 4xx
  or 5xx, and unknown for a 3xx (a redirect loop), which AgentOutcome cannot
  carry. The response keeps the failure report, merged with the model server's.
- PolicyCallError becomes PolicyCallFailure: it holds an AgentOutcome and the
  message, and derives infrastructure from the outcome. It stays local.
- Tests: a timed-out 500 keeps its cause and the model server's report; a
  default-recipe rollout collected through the Environment Server that ends on
  a context-limit refusal after one crop scores 0, is graded, counts the crop
  and records policy_error. The refused-reply fakes now raise as aiohttp does.

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

- server_tools.yaml: the header says the track matches config.yaml only on
  rollouts without a context overflow (simple_agent reports one as a plain 400,
  which this benchmark fails ungraded) and asks for each track's failed-rollout
  count. The Environment Server admits 32 episodes at a time
  (max_concurrent_episodes, queue_timeout_seconds), which bounds the image
  workspaces on the resources server.
- READMEs: replay works only on the agent's own /run; repeatable runs use the
  shared cache with cache_write: false.
- Resources README: under NeMo RL, do not run opencode.yaml with real keys
  until the head server stops returning secrets.

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

The policy model server is a Gym server, so its 400 carries a failure report
that selects the refused model request (model_request_error). The Environment
Server fails a reply whose selected cause does not match its outcome
(model_context_limit), so the context-limit rule stopped grading once the agent
attached the report. The agent now keeps that report's events but selects no
cause for a context-limit refusal, and the outcome policy grades it.

The collected context-limit test now gives the refusal a model-server report;
it fails without this change. The timeout test checks that the Environment
Server rebuilds the timeout as the reply's selected cause, so its timeout rule
(retry by default) applies.

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

The review asked for fewer tests of config values. The deadline and admission tests stay, because each compares
settings in two blocks that gym env validate does not compare.

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

yfw commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test a67d4e0

… session config

The old rows came from the relay to the agent's /run and named the old Environment Server instance. These come from
resources_servers/agentic_mme/configs/agentic_mme.yaml at a67d4e0: the agent's session routes under
single_agent_turn_legacy, instance agentic_mme_environment_server, 5 example rows, a hosted vision-language policy.
All 5 score 1 after one crop; the rows now carry evaluation_completed, step_limit_reached and failure_report.

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

yfw commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0aade7a

@yfw

yfw commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review (5924033396). Each inline point has a reply. The head is now 0aade7a0b0:

  • The fixes are in 12072f9, 78f0f19, caa0e79, 8cd6552 and a67d4e0. 0aade7a regenerates the example rollouts.
  • The description says that its four-track numbers predate 5a0d0b396. It now also has smokes of server_tools.yaml, opencode.yaml and opencode_server_tools.yaml at a67d4e094 (10 real tasks × 2 repeats each). Graded: 20, 16 and 19 of 20. Failed without a grade: 0, 4 and 1. Masked: none. Each failure is the hosted model's HTTP 400 after 26 to 65 tool calls, which the outcome policy fails for every harness.
  • The core fix for the head server is tracked privately, as the reply in that thread explains.

yfw and others added 2 commits November 16, 2026 12:10
Conflict in nemo_gym/config/global_config.py: main added agentvista_agent to AGENT_SESSION_AGENT_TYPES where this
branch adds agentic_mme_agent; both are kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
Main's #5686 makes policy_timeout_failure return model_server_queue_timeout when every attempt waited in the
model server's queue, and simple_agent's session branch now reports the failure's own kind. The agent still
reported model_policy_response_timeout, which no longer matches the cause its report selects, so the Environment
Server would fail the reply instead of applying the queue timeout's rule (retry by default). The agent now reports
the timeout's own kind, as simple_agent does.

The timeout test covers a report without a queue reading, with an empty queue, and with requests waiting; the
queued case fails without this change.

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

yfw commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 68f1cd5

@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/43952904763

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 needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants