Repository navigation
fix(hermes): retain compaction calls and history - #5311
Merged
Merged
Conversation
giuliolovisotto
force-pushed
the
codex/fea-518-hermes
branch
from
October 29, 2026 13:53
d74cd30 to
2b47a3d
Compare
marta-sd
previously approved these changes
Nov 2, 2026
giuliolovisotto
force-pushed
the
codex/fea-518-hermes
branch
from
November 2, 2026 10:59
2b47a3d to
4f09d05
Compare
giuliolovisotto
force-pushed
the
codex/fea-518-hermes
branch
from
November 2, 2026 16:21
3c043fc to
c45ab3d
Compare
giuliolovisotto
force-pushed
the
codex/fea-518-hermes
branch
from
November 2, 2026 16:48
c45ab3d to
fa94a56
Compare
giuliolovisotto
force-pushed
the
codex/fea-518-hermes
branch
from
November 2, 2026 17:00
fa94a56 to
89f2164
Compare
marta-sd
previously approved these changes
Nov 3, 2026
marta-sd
approved these changes
Nov 4, 2026
Signed-off-by: Giulio Lovisotto <[email protected]>
Signed-off-by: Giulio Lovisotto <[email protected]>
Signed-off-by: Giulio Lovisotto <[email protected]>
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41807702558 |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Hermes compression uses an auxiliary client whose routing no longer follows
OPENAI_BASE_URL; its helper usage and removed conversation history also disappear from Gym's exported artifacts. Configure compression's auxiliary client with the episode's actual model-server URL, including the rollout route, and observe the compressor's real model responses.Retain helper IDs, actual summaries and usage, scope capture to each invocation, and restore executed history when exporting observations/output. Hermes still receives its compacted model context. A protected-history no-op produces no completed event; missing helper usage remains unknown rather than an apparently complete aggregate. Host validation adds the model-server scope to helper references.
Earlier validation
python -m pytest -q responses_api_agents/hermes_agent/tests --disable-warnings: 354 passed. Coverage includes model-server routing, protected-history no-ops, repeated compaction, helper usage omission, summary capture, and restored executed history.Rollouts
The pinned Hermes runtime passes the final shared compaction scenario: 16 calls, 15 policy turns, one event, reused summary and retained helper usage. All eight existing P0 scenarios pass. Reproduce with
python scripts/run_harness_conformance.py --harness hermes --scenario context_compaction --gate-tier P1 --output results/hermes-compactionin the Hermes environment.Compatibility and benchmark impact
The agent-session path now routes compression through Gym and includes its cost and original executed history in exported artifacts. Root/delegated invocation ownership is preserved. Production compression thresholds are unchanged; no benchmark input changes.
The stack starts with #5122; #5439 registers the scenario only after the shared support and harness fixes.
All-file
uvx pre-commit run --all-filespassed; all commits have DCO sign-off. Full repository CI has not been validated. Smoke runs use real pinned harness runtimes and a controlled local model provider; they do not qualify remote sandbox infrastructure or model quality.Rebase validation — 2026-11-02
Rebased onto main
0c7ac5119c99e0aa0dfeda7be59157c589680ffd, preserving the existing stack order. Fresh compaction on the pinned Hermes runtime passes all five behavioral checks: 16 calls, 15 policy turns, one event, summary reuse and retained helper usage. This PR’s own patch is unchanged. All-file pre-commit passed on both stack tips; commits have DCO sign-off and SSH signatures. These are local pinned-runtime runs with a controlled provider, not remote deployment or full repository CI qualification.