Repository navigation
fix(hermes_agent): return a process that ended without output instead of raising - #6939
Draft
giuliolovisotto wants to merge 2 commits into
Draft
giuliolovisotto wants to merge 2 commits into
giuliolovisotto wants to merge 2 commits into
Conversation
|
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. |
giuliolovisotto
force-pushed
the
glovisotto/hermes-ended-without-output
branch
from
November 30, 2026 11:49
1ca02f7 to
67efdc0
Compare
giuliolovisotto
changed the base branch from
glovisotto/hermes-task-tools
to
glovisotto/tb41-hermes-nooa-profiles
November 30, 2026 11:49
… of raising A sandboxed Hermes process that ended before it wrote its output made the agent server raise, whatever ended it. The environment server saw an HTTP error, so its agent_outcome_policy never saw the run, and rollout collection ran the task again from the start. A process the supervisor had to kill at its deadline was repeated the same way instead of being graded as a wall-time stop. The agent server now reads the supervisor's cleanup receipt: - stopped at its deadline: a wall-time result with no transcript, returned as an incomplete response and verified like any other wall-time stop; - killed otherwise (an exit code above 128): a failed response with the cause agent_run_error, so the environment's outcome policy decides whether the task is graded, run again or failed. Any other exit without output may be a harness that never started, and still raises. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
hermes_agent returns a process that was killed before it wrote its output as a failed response with the cause agent_run_error. The Harbor environment server's default agent_outcome_policy fails such a task without grading it. terminal_bench_4/hermes maps agent_run_error to verify, so the sandbox is graded as the run left it, as terminal_bench_4/opencode does with verify_after_agent_error. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
giuliolovisotto
force-pushed
the
glovisotto/hermes-ended-without-output
branch
from
November 30, 2026 13:52
67efdc0 to
608d0ec
Compare
This branch has not been 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?
A sandboxed Hermes process that ends before it writes its output is now returned to the environment instead of raising: as a wall-time result when the supervisor stopped it at its deadline, and as a failed response with the cause
agent_run_errorwhen it was killed.Why.
collect_artifactsraisedHermes sandbox runner exited without outputwhatever ended the process. The environment server saw an HTTP error, so itsagent_outcome_policynever saw the run, and rollout collection ran the task again from the start. Two cases were lost this way:What changes (
responses_api_agents/hermes_agent/app.py): when the output capture failed and the supervisor's cleanup receipt is confirmed and carries no supervisor error,timed_out: the run returns a wall-time result with no transcript (stop_reason: wall_time), anincompleteresponse that the environment verifies like any other wall-time stop;failedresponse whoseng_agent_outcomeisagent_run_error. The sharedagent_outcome_policydefault fails that kind without grading or repeating it; a deployment maps it toverifyorretryinagent_outcome_policy.by_failure_kind.TimeoutErrorpath are unchanged. Host execution is unchanged.An exit code is not evidence of an out-of-memory kill, so no
provider_oom_killedis reported here.benchmarks/terminal_bench_4/hermes.yamlmapsagent_run_errortoverifyin the Harbor environment server'sagent_outcome_policy, so a Hermes run that was killed is graded on the sandbox as it left it, asterminal_bench_4/opencodedoes withverify_after_agent_errorand asterminal_bench_4/nooadoes in the PR below this one.No issue is linked.
Validation
uv syncinresponses_api_agents/hermes_agent, thenpython -m pytest responses_api_agents/hermes_agent/tests -q -n 6: 424 passed, 6 skipped.pre-commit runon the changed files: clean.tests/test_app.py): a process killed before its output returns afailedresponse withagent_run_error, which the default policy fails and averifymapping grades; a process stopped at its deadline before its output returns anincompletewall-time response with no outcome metadata; a process that exited with code 1 before its output still raises.Rollouts
Not yet. A small run on
terminal_bench_4/hermesis planned; I will add its evidence here.Compatibility and benchmark impact
Behavior change for sandboxed Hermes. A run killed before it wrote its output was an HTTP error that rollout collection repeated; it is now a classified failed response, which the default outcome policy fails without repeating. A deployment that wants the earlier behavior maps
agent_run_errortoretry. A run killed at its deadline is now verified as a wall-time stop, so scores of such runs can change. Configuration:terminal_bench_4/hermesgrades a killed run instead of failing it.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).🤖 Generated with Claude Code