Repository navigation
refactor(configs): retire tool_simulation_agent and non_executing_simple_agent into simple_agent - #4954
Merged
Conversation
This was referenced Oct 23, 2026
Contributor
Author
|
/ok to test 128288a |
yaoyu-33
commented
Oct 23, 2026
yaoyu-33
left a comment
Contributor
Author
There was a problem hiding this comment.
Team review of the agent consolidation. All 14 configs convert cleanly: each resolves before and after with only the intended differences (simple_agent with execute_tools: false, single_agent_turn_legacy, allowed_agents += simple_agent). Nothing is dropped (max_steps, datasets, model and resources refs). The five verifiers read only task fields, responses_create_params.tools, and response.output/error, so the one-call output reaches them unchanged.
Not inline:
- Keeping
tool_simulation_agentinallowed_agentsis reasonable while it is deprecated. Swapping it in with--agent-type, though, now fails on/v1/agent_sessions(it has no session support), which is the composition gap raised on #4953. That fix covers this case too. - Only
bc_v4_8asserts the new wiring. A cheap parametrized test over the 14 YAMLs (simple_agent,execute_toolsfalse,single_agent_turn_legacy) would guard the rest. - Stub-model parity covers 3 of 14 configs; the real-model profile is pending, as the body says.
Contributor
Author
|
/ok to test 3e6c00b |
Contributor
Author
|
/ok to test 521205f |
yaoyu-33
force-pushed
the
yuya/gymint-147-217-retire-into-simple-agent
branch
from
October 27, 2026 18:59
bf975ad to
3198f93
Compare
yaoyu-33
force-pushed
the
yuya/gymint-147-217-retire-into-simple-agent
branch
from
October 27, 2026 20:04
3198f93 to
daf0ca2
Compare
8 tasks
…ple_agent into simple_agent Both agents make one model call and pass its tool calls to the verifier unexecuted. simple_agent with execute_tools: false does the same as an agent session, so its configs run under single_agent_turn_legacy and resume inside the turn after a crash (GYMINT-217, GYMINT-147). 14 configs move: image_tools_pivot, swe_pivot, structured_outputs_v4, seven single_step_tool_use_with_argument_comparison configs and four terminal_multi_harness configs. Each agent keeps its instance name and becomes simple_agent with execute_tools: false; its relay becomes a single_agent_turn_legacy server, which simple_agent needs since it refuses /run without tool execution; allowed_agents gains simple_agent. The pivot-dataset skill's template and reference config writer emit the same pairing. Both agents stay, marked deprecated, so configs outside the repository keep working until a later release removes them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
…ent configs With execute_tools: false the agent never calls a tool, so the direct_http grant on the 14 converted configs was unused, and the pivot skill's template already omits it. It also made a silent mis-score possible: `--agent-type simple_agent` is now allowed on these servers, composition does not carry execute_tools over, and the swapped-in agent would execute tools through the grant against verifiers that score one unexecuted call. Without the grant it fails loudly instead. A repository test now asserts that no execute_tools: false simple_agent sits behind a legacy_agent relay (its /run refuses) or gets a tool grant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
cmunley1
force-pushed
the
yuya/gymint-147-217-retire-into-simple-agent
branch
from
October 30, 2026 21:59
daf0ca2 to
5d76e08
Compare
#4953 moved `default_episode_timeout_seconds: 21600` and `cleanup_timeout_seconds: 180` into `SingleAgentTurnLegacyEnvironmentServerConfig` and dropped them from the migrated configs. The configs this PR switches, the pivot skill example, and its reference config writer still repeated them. The effective settings are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: weijia chen <weijiac@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: weijia chen <weijiac@nvidia.com>
Contributor
|
/ok to test 0746359 |
weijiac0619
approved these changes
Nov 2, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41504443634 |
weijiac0619
added a commit
that referenced
this pull request
Nov 2, 2026
#4952, #4953 and #4954 are now on main as squashed commits, so this branch's copies of them conflict with main in 290 files. The merge result is this PR's own change, 00a6819, applied to main. The one conflict is the generator's comment above SWITCHED: the template keeps 00a6819's explicit resources binding and main's timeout defaults, and the comment now describes only those defaults. Signed-off-by: weijia chen <weijiac@nvidia.com>
AdamRajfer
added a commit
that referenced
this pull request
Nov 2, 2026
Brings in main up to 94545e7 (#5141, #5384, #5144, #4615, #4954, #5001, #5175). Textual conflict: nemo_gym/cli/env.py, imports only. This branch imports PIPE from subprocess (the server start error capture); main imports SIGKILL from signal (#5141, the shutdown drain). Both are kept: "from signal import SIGINT, SIGKILL" and "from subprocess import PIPE, Popen, TimeoutExpired". Semantic conflict: #5141 starts each server in its own session (run_command(..., start_new_session=True)) so shutdown can signal its process group, while this branch starts servers through RunHelper._spawn_server, which keeps the tail of the error stream. The merged call passed start_new_session to _spawn_server, which did not accept it (11 test_cli failures). _spawn_server now takes start_new_session and forwards it to run_command, so both behaviours hold. The dry-run path keeps this branch's process.wait(): the tail thread of _spawn_server owns the piped stream, so main's communicate() would compete with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Adam Rajfer <arajfer@nvidia.com>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
tool_simulation_agentandnon_executing_simple_agentmake one model call and pass its tool calls to the verifier unexecuted.simple_agentwithexecute_tools: falsedoes the same, as an agent session. Moving their configs onto it puts them undersingle_agent_turn_legacy. A crash then repeats only the current step, and the agent resumes inside its turn for free.14 configs move (13
tool_simulation_agent, 1non_executing_simple_agent):image_tools_pivot,swe_pivot,structured_outputs_v4, sevensingle_step_tool_use_with_argument_comparisonconfigs (includingbc_v4_8), and fourterminal_multi_harnessconfigs. In each:simple_agentwithexecute_tools: false, keeping its instance name, so training configs and rowagent_refs still resolve;single_agent_turn_legacy, generated with feat(scripts): switch simple_agent relays to single_agent_turn_legacy #4952's script. It has to:simple_agentrefuses/runwhenexecute_toolsis false. Its timeouts come from the server's defaults (21600 s episode, 180 s cleanup), as in chore(configs): move simple_agent configs off the legacy_agent relay #4953;resources_tool_transports), since a non-executing agent calls no tool. The pivot skill's template does the same;allowed_agentsgainssimple_agent. Rows routed straight to the agent are checked against it, andtool_simulation_agentstays listed while it exists.The pivot-dataset skill's config template and its reference config writer now emit
simple_agent(execute_tools: false) with asingle_agent_turn_legacyserver. Theimage_toolsREADME pairing note is updated.Not deleted: both agents stay, and their READMEs now say they're deprecated. Deleting them would break user configs that name these agent types, so removal is left for a later release.
Out of scope: agents not present in this public repository.
Design
Markers: green NEW, orange CHANGED, red dashed BROKEN; the label text says the same, so the diagrams read without color.
1. One episode, before and after
Before:
tool_simulation_agentbehind the relay.sequenceDiagram autonumber participant RC as Rollout collection participant LA as legacy_agent (relay) participant TS as tool_simulation_agent /run (REMOVED from configs) participant M as Model participant RS as Resources server RC->>LA: /run LA->>TS: /run (whole episode) opt only when checkpointing TS->>RS: /seed_session end TS->>TS: /v1/responses (self-dispatch) TS->>M: /v1/responses (one call) Note over TS: tool calls are never executed TS->>RS: /verify (response with the function_call items) TS-->>LA: result LA-->>RC: resultAfter:
simple_agentwithexecute_tools: falseundersingle_agent_turn_legacy.sequenceDiagram autonumber participant RC as Rollout collection participant ES as single_agent_turn_legacy (NEW for these configs) participant AG as simple_agent, execute_tools=false (NEW) participant M as Model participant RS as Resources server RC->>ES: /run (same row, same server and agent names) ES->>RS: /seed_session (always) ES->>AG: /v1/agent_sessions (no tool grant) ES->>AG: /v1/responses AG->>M: /v1/responses (one call) Note over AG: execute_tools=false: stop after this call,<br/>return the function_call items unexecuted AG-->>ES: response ES->>AG: /v1/agent_sessions/close ES->>RS: /verify (same response shape) ES->>RS: /close_session (always) ES-->>RC: flat result row2. How each of the 14 configs changes (
swe_pivotshown)Before
flowchart LR E0["swe_pivot_environment_server<br/>legacy_agent"] --> A0["swe_pivot_tool_simulation_agent<br/>responses_api_agents.tool_simulation_agent"] A0 -- "resources_server" --> R0["swe_pivot resources server<br/>allowed_agents: [tool_simulation_agent]"]After
flowchart LR E1["swe_pivot_environment_server (name kept)<br/>CHANGED: single_agent_turn_legacy<br/>(simple_agent refuses /run without tool execution)<br/>NEW: no resources_tool_transports"] --> A1["swe_pivot_tool_simulation_agent (name kept)<br/>CHANGED: responses_api_agents.simple_agent<br/>NEW: execute_tools: false"] A1 -- "resources_server" --> R1["swe_pivot resources server<br/>CHANGED: allowed_agents: [simple_agent, tool_simulation_agent]"] E1 -. "binds the agent's resources server" .-> R1 D["tool_simulation_agent and non_executing_simple_agent<br/>still exist, READMEs marked deprecated"] class E1,A1,R1,D changed classDef new fill:#e6f4ea,stroke:#1e8e3e,stroke-width:2px,color:#111 classDef changed fill:#fff4e5,stroke:#e8710a,stroke-width:2px,color:#111 classDef removed fill:#fce8e6,stroke:#d93025,stroke-width:2px,stroke-dasharray:5 5,color:#111Validation
gym env resolveon all 638 server configs, before (chore(configs): move simple_agent configs off the legacy_agent relay #4953) and after. The same 128 fail on both sides, and none changed status. In the structural check, 14 more relays becomesingle_agent_turn_legacy, and all bind their agent's resources server. 0 problems. At the current head,swe_pivot,bc_v4_8andstructured_outputs_v4resolve withsingle_agent_turn_legacyand no tool grant.test_repository_non_executing_simple_agents_run_in_sessions_without_tool_access) asserts that noexecute_tools: falsesimple_agentsits behindlegacy_agentor gets a tool grant. It fails with the grants restored. Generator tests: 86 passed.single_step_tool_use_with_argument_comparison: 101 passed;bc_v4_8wiring assertsexecute_tools: falseand the new server.swe_pivot: 190 passed;image_tools: 32 passed.terminal_multi_harnessandstructured_outputsdon't collect in this venv (openapi_schema_validator,xmltodictare missing), the same as on the base. They read no configs, and this PR changes none of their code. On a workstation with their dependencies, they passed in isolated processes (54 and 6 tests).pre-commit run --files <changed files>: clean.Preserved-name restack validation
git range-diffconfirms this PR's two retirement commits retain their patches.pre-commit run --all-files, DCO trailers, and whitespace checks pass. The combined fix(env): own resources bindings and resolve inherited renames #5108 stack passes 1,184 focused tests.Rollout evidence: relay vs session parity
These runs use a stub Responses model, not a real one: it calls the first offered tool once, then answers. The same four example rows per config went through the old path (this PR's base: the old agent behind the relay) and the new one, on the same server code.
swe_pivotsingle_step_tool_use_with_argument_comparisonstructured_outputs_v4On the session path every row seeds, opens the agent session, makes one model call (no tool route is called), closes the agent, verifies, and closes the resources session. On the relay, the agent's
/rundid the episode itself.Real model, paired. All 14 changed configs plus one public SWE crosscheck ran against #4953 (old agent behind the relay) and this PR (
128288a3b, before the tool grant was dropped). Each used real data, including the original embedded images with a vision model:Dropping the unused grant after that run changes no call the episode makes; an independent re-check after the change passed 14/14 paired protocol checks.
Not done: a full reward-profile comparison on a pivot training distribution. The
terminal_multi_harnessrows exercised the shipped Codex examples, not each harness's private distribution.Compatibility
tool_simulation_agent:simple_agentmarks a reasoning-only replyincomplete; it is still verified./runerror.skip_verificationkeeps working through feat(environment): honor skip_verification in single_agent_turn #4949.--agent-typeswaps on these configs:simple_agentis now allowed. Composition doesn't carryexecute_tools: falseover, but without a tool grant such an agent fails loudly when it calls a tool, instead of being mis-scored. The session-less composition fallback from fix(config): relay session-less agents swapped onto single_agent_turn_legacy #4995, carried by chore(configs): move simple_agent configs off the legacy_agent relay #4953 and inherited here, routes a swapped-intool_simulation_agentthroughlegacy_agent.CI refresh (2026-10-23)
Rebased onto
mainat8041d1910and preserved the existing stack bases. This includes #4973's atomic resubmit-lock fix and #4966's TerminusPROMPT_COMMANDfix, which address the failures in the previous CI runs. No additional runtime behavior changes were introduced by this refresh.Restacked on the rebased #4953. The repository non-executing-agent wiring check and
test_bc_v4_8_config.py: 14 passed. Thesingle_agent_turn,single_agent_turn_legacy, andsimple_agentapp tests: 220 passed. The original migration patches are unchanged.pre-commit run --all-files,git diff --check, and DCO trailer checks passed. Fresh Linux CI is still required on the new head. Rollout evidence for this refresh: N/A; this only rebases the existing changes onto the upstream CI fixes.Update after #4953 merged (2026-10-30)
When #4953 merged, this PR's two commits were replayed onto
main(7f9972dd0). The replay kept their authorship and messages, andgit patch-idshows the same patch as before. Two commits are added on top:chore(configs): rely on single_agent_turn_legacy timeout defaults: chore(configs): move simple_agent configs off the legacy_agent relay #4953 moveddefault_episode_timeout_seconds: 21600andcleanup_timeout_seconds: 180intoSingleAgentTurnLegacyEnvironmentServerConfigand dropped them from the migrated configs. The 14 configs here, the pivot skill example, and its reference config writer still repeated them. The effective settings are unchanged.chore(image_tools): drop the comment execute_tools now states.Tests (Linux, server tests run from each server directory as CI does):
test_global_config,test_benchmarkssingle_step_tool_use_with_argument_comparisonswe_pivotimage_toolsterminal_multi_harnessstructured_outputssimple_agentOld vs. new rollouts. Each config was started from
main(7f9972dd0: the old agent behindlegacy_agent) and from this head (simple_agentwithexecute_tools: falseundersingle_agent_turn_legacy). The example rows were posted to the environment server's/runagainst a deterministic stub model in four modes: replay of the recorded outputs, a call to the first offered tool, a message only, and reasoning only.single_step_tool_use_with_argument_comparisonbc_v4_8swe_pivotimage_tools_pivotterminal_multi_harness_agent006structured_outputs_v4No errors on either side. The only visible difference is the one listed under Compatibility: in reasoning-only mode, the new path marks the response
incomplete(incomplete_reasoning), with the same reward.🤖 Generated with Claude Code