Repository navigation
Description
#2114 landed the rollout correlation contract, and nemo_gym/rollout_correlation.py gives a resources server the current rollout id via ROLLOUT_PATH_PREFIX (nemo_gym/config_types.py:795), RolloutContextMiddleware, and current_rollout_id(), installed at nemo_gym/base_resources_server.py:139. Two gaps remain.
It is one-directional. BaseSeedSessionResponse (base_resources_server.py:119-120) is an empty model and BaseVerifyResponse carries no identifier, so the environment-side handle — the container, browser context, or provider session that actually consumed quota — never reaches the training side. #2122 states this explicitly: "No rollout identifier is added to public request schemas."
It is gated on observability. nemo_gym/server_utils.py:341-348 only applies the rollout prefix when observability_enabled is true, and base_responses_api_agent.py:96-98 returns None otherwise. That flag defaults off, so current_rollout_id() is None inside resources servers by default — including in the production runs where an incident actually happens.
Consequence: when a run degrades, the training side has rollout ids, the provider has environment session ids, and the only join key is a timestamp. Reconstructing which orphaned sessions belonged to which aborted rollouts across our GB200 incident (1172 of 1280 rollouts over steps 61–80) was done by hand; with a returned session id it would have been a groupby. This is also the environment-side half of #238, where the reporter's workaround is threading the session id manually through every call.
Proposal:
class BaseSeedSessionResponse(BaseModel):
env_session_id: Optional[str] = None # container / browser context / provider session, opaque to Gym
class BaseVerifyResponse(BaseVerifyRequest):
env_session_id: Optional[str] = None # same handle, returned with the scoreplus making rollout-prefix propagation to resources servers independent of observability_enabled, or giving it its own flag. That second part needs a test covering catch-all-route environments, given the route-ordering note in the resources-server implementation guide.
Both fields are optional and default to None. No training framework needs a transport change — verl and NeMo-RL already carry the whole verify response as full_result (verl-recipe nemo_gym/agent_loop.py:460; nemo_rl/experience/rollouts.py:2735), and miles carries it in Sample.metadata. There is precedent for extending the seed response: AviarySeedSessionResponse, ToolSandboxSeedSessionResponse and ExampleMCPWeatherSeedSessionResponse already subclass it.
We are happy to implement this.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(observability): return the environment session id and allow corr…
feat(observability): return the environment session id and allow corr…
feat(observability): return the environment session id and allow corr…
waple0820 commentedon Oct 3, 2026
Closing. #3717 put
episode_idon both the seed request and the episode result, so an environment can log its provider handle against the rollout without returning a new field or turning on capture. #3932 does this forinteractive_browser: the provider session is tagged with the episode, and the acquire log line names both. The legacy/runpath is left as is, see #2613.