Repository navigation
feat: add SWE Pro resources sessions - #3718
Merged
ananthsub merged 2 commits intoSep 29, 2026
Merged
Conversation
ananthsub
force-pushed
the
ananthsub/episode-orchestration-07-swe-pro-sessions
branch
from
September 28, 2026 15:41
02b85d2 to
9d80a03
Compare
ananthsub
changed the base branch from
ananthsub/episode-orchestration-06-single-agent-processor
to
ananthsub/episode-orchestration-09-legacy-adapter
September 28, 2026 15:42
ananthsub
force-pushed
the
ananthsub/episode-orchestration-07-swe-pro-sessions
branch
from
September 28, 2026 15:48
9d80a03 to
c9d8ea4
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-07-swe-pro-sessions
branch
from
September 28, 2026 16:03
c9d8ea4 to
79232b6
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-07-swe-pro-sessions
branch
from
September 29, 2026 00:16
04a682a to
28e1f71
Compare
marta-sd
force-pushed
the
ananthsub/episode-orchestration-07-swe-pro-sessions
branch
from
September 29, 2026 06:22
28e1f71 to
50462e7
Compare
marta-sd
force-pushed
the
ananthsub/episode-orchestration-07-swe-pro-sessions
branch
from
September 29, 2026 08:57
50462e7 to
e33a0d5
Compare
Base automatically changed from
ananthsub/episode-orchestration-09-legacy-adapter
to
main
September 29, 2026 09:31
marta-sd
force-pushed
the
ananthsub/episode-orchestration-07-swe-pro-sessions
branch
from
September 29, 2026 09:31
e33a0d5 to
849d147
Compare
Signed-off-by: Ananth Subramaniam <[email protected]>
The single-agent-turn Environment Server now sends /verify the body an Agent's /run sends: the task's fields, responses_create_params, and the agent's response, under the Resources session cookie that identifies the episode. Existing Resources Servers verify these episodes without a second request type, and records and reverification use the same body as live grading. SingleAgentTurnVerificationInput and SingleAgentTurnResourcesVerifyRequest are removed, so no Resources Server depends on an Environment Server's protocol. SWE-bench Pro accepts one verify model, finds its sandbox through the session, and still rejects a repeated verify of a typed session whose sandbox is consumed. Signed-off-by: Ananth Subramaniam <[email protected]>
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/36595837317 |
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 does this PR do?
Adds typed session support to SWE-bench Pro while preserving its legacy request shapes, and makes the single-agent-turn Environment Server verify through each Resources Server's own verify body.
SWE-bench Pro sessions:
/close_sessioncloses a typed session when given aResourcesCloseSessionRequest, and closes the cookie session when given an empty body, ashermes_sandboxed_agentsends.Verification contract:
single_agent_turnnow sends/verifythe flat body an Agent's/runsends: the task'stask_datafields,responses_create_params, and the agent'sresponse. The request carries the Resources session cookie from seeding, which identifies the episode.SingleAgentTurnVerificationInputandSingleAgentTurnResourcesVerifyRequestare removed, so no Resources Server depends on an Environment Server's protocol. This changessingle_agent_turncode merged in feat: add single-agent-turn environment server #3717.SWEBenchProVerifyRequest, and finds its sandbox through the session.ResourcesVerifyRequest[T]stays for Resources Servers paired with their own Environment Server, whose payload type they define.single_agent_turnnow carry the same echoed task fields as records from an Agent's/run, and reverification sends the body live grading sends.Single-agent-turn interaction flow
This diagram describes SWE-bench Pro under the built-in single-agent-turn Environment Server. Other Environment Servers may use different lifecycle and result contracts.
sequenceDiagram participant E as EnvironmentServer participant R as SWEProResources participant S as TaskSandbox E->>R: Seed with task data and caller ID R->>S: Start and prepare sandbox R-->>E: SandboxAccess and session cookie E->>R: Verify with task fields and the Agent response, under the session cookie R->>S: Extract patch and run evaluator R-->>E: Verification result E->>R: Close sessionStack position
Part 1 of 4, based on
main. Next: #3720.No issue is linked because this is one layer of the Environment Server stack.
Validation
uv run pytest resources_servers/swebench_pro/tests -q— 84 passeduv run pytest environment_servers/single_agent_turn/tests/test_app.py -q— 12 passed, including a check that/verifyreceives the flat body under the Resources session cookieuv run pytest tests/unit_tests -q— passes except two tests that also fail onmainin the local environment (missingsandboxextras and a pip notice)pre-commit runon the changed filesRollouts
A real Hermes + SWE-bench Pro rollout through
single_agent_turn_legacyresolved its task (reward1.0, 300 of 300 tests) with the flat verify body under a typed session, with an empty failure sidecar and no leftover sandboxes. Its record carries the task fields, as a/runrecord does.Compatibility and benchmark impact
Legacy SWE-bench Pro request bodies remain supported. Existing Resources Servers verify single-agent-turn episodes without changes.
SingleAgentTurnVerificationInputandSingleAgentTurnResourcesVerifyRequestare removed fromnemo_gym.single_agent_turn_types; they landed in #3717 and had no users outside this stack.