Repository navigation
Description
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.cookiesIt 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:
- Parse the server name, URL path, transport, and signed headers.
- Resolve the resources-server base URL.
- Add the server to Hermes's existing
mcp_serversconfiguration for that rollout. - Keep the token isolated to that rollout under concurrent execution.
- Preserve the session cookie for
/verify. - 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_sessioncall. - 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.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDev Todo
Activity
[-]feat(hermes_agent): consume resources-server MCP metadata from seed_session[/-][+]bug(hermes_agent): consume resources-server MCP metadata from seed_session[/+]