Skip to content

refactor: describe the flat-row and /run paths without "legacy" - #4855

Draft
ananthsub wants to merge 2 commits into
mainfrom
ananthsub/no-legacy-session-terms
Draft

ananthsub wants to merge 2 commits into
mainfrom
ananthsub/no-legacy-session-terms

Conversation

@ananthsub

@ananthsub ananthsub commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Removes "legacy" from prose that describes the flat-row path, the agent's own /run path, and the relay in front of it. All three were called "legacy", which says the path is old but not what it does, so each use now names the concrete thing:

Before After
a legacy /run, the legacy /run path the agent's own /run
a legacy row, a legacy flat row, a legacy seed body a flat row, a flat seed body
the legacy agent relay, legacy adapters the legacy_agent relay
legacy swap source, legacy swap configurations --agent-type swap source and configurations, which rebind the agent's own resources_server
legacy Agent-to-Resources bindings the agent's own resources_server binding

The change covers:

  • Docstrings and comments in nemo_gym/_checkpoint, base_resources_server.py, base_responses_api_agent.py, episode_types.py, mcp_auto_exposure.py, rollout_collection.py, and the legacy_agent and single_agent_turn_legacy servers.
  • Error messages from Codex ("The agent's own /run requires resources_server") and Simple Agent (its /run route and tool-call messages).
  • Comments and READMEs for Simple Agent, Codex, Pi, Kilo, OpenClaw, Claude Code, Hermes, and mini-SWE, the harness conformance README and runner, and two docs pages.
  • Test names, fixture values, and local variables that call rows, agents, or servers "legacy", for example hermes_legacy, legacy_rows, and the harness conformance LegacyAgent test class.
  • The legacy_agent README and module docstring, the architecture page, the Agent Server overview, the existing-agents guide, and the new-environment guide now state that legacy_agent is the legacy path and that Gym plans to deprecate it and remove support for it over time, so new agents should implement agent sessions. Before this, the docs only deprecated relays that Gym generates for agents without a declared Environment Server. The Codex README labels its /run sections as the legacy /run quick start and limitations, and points new experiments at the agent session workflow.

Names that configs or outputs depend on are unchanged: legacy_agent, single_agent_turn_legacy, environment_routing_mode: legacy, and the legacy_run value of agent_interface in harness conformance output. Internal identifiers such as LegacyRun, legacy_run(), legacy_episodes, run_legacy, _legacy_result, and Simple Agent's _LegacyLoopReply also keep their names, as do the tests named after them; renaming those is a separate refactor. Uses of "legacy" with another meaning, such as deprecated agent_ref routing, deprecated dataset fields, ng_* command aliases, and older token capture formats, are unrelated and unchanged.

Issue

No issue is linked. This is the companion terminology change to #4854, which removed "native" following #4070.

Validation

  • pytest -n 16 tests/unit_tests/test_rollout_collection.py tests/unit_tests/test_checkpoint_agent.py tests/unit_tests/test_base_resources_server.py tests/unit_tests/test_checkpoint_resources.py tests/unit_tests/test_environment_server.py tests/unit_tests/test_mcp_auto_exposure.py scripts/harness_conformance/tests covers the renamed routing, checkpoint, and harness conformance tests.
  • pytest environment_servers/legacy_agent/tests (also after the legacy_agent docstring change), pytest environment_servers/single_agent_turn/tests, and pytest environment_servers/single_agent_turn_legacy/tests, run separately, cover the flat-row adapter tests.
  • pytest responses_api_agents/{simple_agent,codex_agent,pi_agent,openclaw_agent,opencode_agent,kilocode_agent,claude_code_agent}/tests, in a venv with nemo-gym[dev,sandbox], covers the reworded error messages and renamed agent tests. The pinned-Pi CLI tests fail identically on main without the pinned Pi runtime installed.
  • pytest --collect-only tests/e2e/checkpoint confirms the renamed end-to-end test collects.
  • pre-commit run --files on the changed files, including guardwords-check.

Rollouts

N/A: the changes are wording in docs, comments, error messages, and tests. No rollout behavior changes.

Compatibility

No API, configuration, or result changes. The Codex /run error and the Simple Agent /run and tool-call error messages have new wording, so anything matching their exact text needs the new text.

@ananthsub ananthsub added docs Documentation-only updates or documentation debt area:env-infra Shared environment framework, lifecycle, registry, scaffolding, and validation needs-review PR is ready for code review and waiting on a reviewer labels Oct 21, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 21, 2026 14:02
@ananthsub
ananthsub marked this pull request as draft October 21, 2026 14:04
@copy-pr-bot

copy-pr-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown
Contributor

Base automatically changed from ananthsub/no-native-session-terms to main October 21, 2026 16:59
Prose about the path where an agent runs a whole episode through its own `/run`, the flat rows
sent on that path, and the relay in front of it called all three "legacy".
That word says the path is old, not what it does, so each use now names the concrete thing:

- A "legacy /run" is the agent's own `/run`.
- A "legacy row" or "legacy seed body" is a flat row or flat seed body.
- "The legacy agent relay" is the `legacy_agent` relay.
- A "legacy swap" is an `--agent-type` swap, which rebinds the agent's own `resources_server`.

Error messages from Codex and Simple Agent, docstrings and comments, agent READMEs, the harness
conformance README, and test names and fixture values follow the same wording.

Names that configs or outputs depend on are unchanged: `legacy_agent`,
`single_agent_turn_legacy`, `environment_routing_mode: legacy`, and the `legacy_run` value of
`agent_interface`.
Internal identifiers such as `LegacyRun`, `legacy_run()`, `run_legacy`, and Simple Agent's
`_LegacyLoopReply` keep their names, as do the tests named after them.
Other meanings of "legacy", such as deprecated `agent_ref` routing, deprecated dataset fields,
and `ng_*` command aliases, are unrelated and unchanged.

Signed-off-by: Ananth Subramaniam <[email protected]>
`legacy_agent` relays `/run` to an agent that runs the whole episode itself.
Gym plans to deprecate that server and remove support for it over time, but the docs only
deprecated relays that Gym generates for agents without a declared Environment Server.

The `legacy_agent` README and module docstring, the architecture page, the Agent Server
overview, the existing-agents guide, and the new-environment guide now say that `legacy_agent`
is the legacy path and that new agents should implement agent sessions.
The Codex README calls its `/run` sections the legacy `/run` quick start and limitations, and
points new experiments at the agent session workflow.

Signed-off-by: Ananth Subramaniam <[email protected]>
@ananthsub
ananthsub force-pushed the ananthsub/no-legacy-session-terms branch from c9b3cc1 to adec73f Compare October 21, 2026 18:09

This branch was previously deployed

1 inactive (outdated) deployment
public — c9b3cc1b Deployed Oct 21, 2026 by copy-pr-bot[bot] via release / finalize / notify #6258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:env-infra Shared environment framework, lifecycle, registry, scaffolding, and validation docs Documentation-only updates or documentation debt 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.

1 participant