Skip to content

bug(hermes_agent): consume resources-server MCP metadata from seed_session #2667

Description

@cwing-nvidia

Summary

Gym resources servers can return a per-rollout MCP endpoint and signed session token from /seed_session, but responses_api_agents/hermes_agent currently ignores that response body. Consequently, Hermes cannot call Gym resources-server tools even though the pinned upstream Hermes runtime supports HTTP MCP servers.

This is a Gym Hermes-harness integration gap. Workplace Assistant is one affected environment, but the issue applies to any stateful resources server exposed through Gym MCP.

Current behavior

HermesAgent.run() posts to /seed_session, checks the response, and retains only its cookies:

seed_resp = await self.server_client.post(...)
await raise_for_status(seed_resp)
cookies = seed_resp.cookies

It never reads NEMO_GYM_MCP_METADATA_KEY from the response JSON. The cookies are later used for /verify, but Hermes receives neither the MCP URL nor the X-NeMo-Gym-Session-Token header.

This matches the original documented scope in responses_api_agents/hermes_agent/README.md: Hermes uses its own toolsets and the resources server only for task data and verification. It is therefore not a regression in the resources-server framework; it is missing functionality in this agent harness.

By comparison, claude_code_agent and codex_agent consume the same metadata and construct a rollout-specific MCP client configuration.

Expected behavior

When /seed_session returns MCP metadata, the Hermes harness should:

  1. Parse the server name, URL path, transport, and signed headers.
  2. Resolve the resources-server base URL.
  3. Add the server to Hermes's existing mcp_servers configuration for that rollout.
  4. Keep the token isolated to that rollout under concurrent execution.
  5. Preserve the session cookie for /verify.
  6. Continue working unchanged with verifier-only resources servers that return no MCP metadata.

Hermes's configuration is currently written through process-global HERMES_HOME, so the implementation must avoid sharing one rollout's MCP token with another rollout.

Acceptance criteria

  • Hermes can discover and call tools from a Gym resources server with expose_tools_over_mcp: true.
  • Each concurrent rollout uses only the token returned by its own /seed_session call.
  • Missing MCP metadata preserves today's verifier-only behavior.
  • Tests verify metadata parsing, URL/header propagation, session-cookie propagation, concurrency isolation, and cleanup.
  • Documentation no longer states that resources-server tools are categorically unsupported.

Tool-name normalization for non-Claude MCP clients should be addressed separately from the transport/session handoff.

Activity

  1. added theissue type on Aug 21, 2026
  2. added
    waiting-on-maintainers
    on Aug 24, 2026
  3. removed
    waiting-on-maintainers
    on Aug 25, 2026
  4. changed the title [-]feat(hermes_agent): consume resources-server MCP metadata from seed_session[/-] [+]bug(hermes_agent): consume resources-server MCP metadata from seed_session[/+] on Aug 31, 2026
  5. moved this from Dev WIP to Dev Todo in NeMo Gym 0.7.0 - Oct 7on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions