Why two harnesses that share an agent type are refused at startup

NVIDIA-NeMo/RL #5158 ยท RL links pinned to 824c116, Gym links to its pinned submodule 9e2e5d0

Before
No multi-harness routing existed. One taskset ran on one Gym server.
This PR
Names each harness by its agent's type (the key under responses_api_agents) and requires the servers of one taskset to have different types.
Status
Open, not fixed in this PR. Raised in review comment C1. It fails loudly at startup, not silently.

Three pages on this PR, one question each. This one: which harness name to use.

In Gym, an agent entry has a unique name and a type. Many harnesses can share one type: Gym's workspace_bench/pi.yaml and codex.yaml are both type harness_agent, told apart by agent: pi / agent: codex. They load the same dataset and use the same resources server, so they run the same tasks: exactly the case multi-harness training is for. The PR's describe_environment_server reads the type, so both harnesses look the same, and the repeated-agent check stops the run.

Gym config (two harnesses for taskset workspace_bench) workspace_bench_pi_agent: responses_api_agents: harness_agent: agent: pi workspace_bench_codex_agent: responses_api_agents: harness_agent: agent: codex This PR: name = agent type Fix: name = agent entry, as Gym does describe_environment_server pi server โ†’ agent "harness_agent" codex server โ†’ agent "harness_agent" environment_server_attributed_agent (Gym) pi server โ†’ "workspace_bench_pi_agent" codex server โ†’ "workspace_bench_codex_agent" resolve_multi_harness: repeated agents? ValueError: Taskset 'workspace_bench' lists several servers that run agents ['harness_agent'] resolve_multi_harness: repeated agents? no โ€” two different names weights {workspace_bench_pi_agent: 3, โ€ฆ} metrics workspace_bench/workspace_bench_pi_agent/โ€ฆ Red border: what this PR does today. Green border: the proposed fix. Even without the check on the left, weights and the per-harness metric names could not tell pi from codex, because both are "harness_agent".

The fix, as pseudocode (proposed, not in the PR)

Where the fix lands: RL only. describe_environment_server, the design doc's weights example, and the describe tests. No Gym change: Gym already exports the helper that names a server's agent. Nothing below is implemented.

# on the Gym actor (Gym is installed there), once at startup
def describe_environment_server(name, gym_config):
    server = only_value(gym_config[name].environment_servers)
    from nemo_gym.config.global_config import environment_server_attributed_agent
    agent = only_key(gym_config[server.agent_server.name].responses_api_agents)  # type: "harness_agent"
    agent = environment_server_attributed_agent(server)                    # name: "workspace_bench_pi_agent"
    return Info(agent=agent, ...)                                           # weights, _ng_harness, resume check all use it

Real code: describe_environment_server agent lookup; its only caller, NemoGym.describe_environment_servers, already imports from Gym on the actor.

No saved run uses the type-based name yet, so changing it breaks no checkpoint. When an entry's name equals its type, as in the PR description's opencode_agent / pi_agent example, the weight keys stay the same.

๐Ÿ”ด review comment C1 โ€” nemo_gym_multi_harness.py:269

So what. As written, multi-harness training works only when every harness has its own agent type. Gym's own multi-harness benchmarks don't work that way, and they fail at startup with the error above. Naming harnesses by agent entry, using the helper Gym already has, removes the limit and keeps Gym and RL agreeing on which agent a server's results belong to.