Skip to content

refactor(agent): move Hermes, Stirrup, BrowseComp and NOOA to the outcome ladder - #5879

Open
yaoyu-33 wants to merge 10 commits into
feat/agent-outcome-ladderfrom
refactor/outcome-ladder-python-host-adapters
Open

yaoyu-33 wants to merge 10 commits into
feat/agent-outcome-ladderfrom
refactor/outcome-ladder-python-host-adapters

Conversation

@yaoyu-33

@yaoyu-33 yaoyu-33 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Stacks on #5870 (the shared outcome ladder). The base is feat/agent-outcome-ladder, so this diff shows only the four adapters. Merge #5870 first.

What changed and why

The same event got a different response in each of these adapters. This PR moves each one onto the ladder: the adapter fills a RunEvidence from its own records and returns finish_response(...) with HTTP 200. Launch, supervisor, capture and unreadable-artifact failures still raise.

  • Hermes (hermes_agent/app.py, sandbox.py)
    • _run_evidence reads the pinned Hermes result:
      • stop_reason wall_time → deadline, cancelled → stopped (the session's close), max_iterations → turn limit;
      • the two truncation errors → output limit;
      • "Context length exceeded" → context limit;
      • any other error/failed → classify_outcome.
    • A reply is an assistant message after the request's own messages.
    • The context-limit status flip and its stale model_context_limit metadata are gone.
    • A runner exception was a 500. It is now 200 failed agent_run_error (retried by default), and the runner's observations are kept.
  • Stirrup (stirrup_agent/sandbox_runner.py, app.py, sandbox.py)
    • The runner keeps every APIStatusError with its status. Before, it re-raised everything except 400/413/422, which produced a 500 that lost the status.
    • It records an APIConnectionError as a transport error, with the turns completed so far.
    • classify_outcome maps it to model_transport_error.
    • A runner exception (for example a task tool's server failing) is 200 agent_run_error instead of a 500.
    • stop_reason cancelled → stopped.
  • BrowseComp (browsecomp_agent/app.py)
    • In an agent session, a model call that fails after Gym's client retries ends the run with the trajectory so far. It is classified by its status, or as model_transport_error.
    • The hand-written ng_agent_outcome (_model_request_failure), which dropped the partial output, is gone.
    • A token-count endpoint failure is no longer reported as model_request_error. It ends the loop, and the error receipt is answered 200 agent_run_error instead of a 500.
    • The session loop's evidence reads the stop reason the loop records (feat(browsecomp): port RL caching, stop reasons, and lifecycle logs #6088, now in the base): context_full (a length cut below the output budget, how the model server answers an overflow) → context limit, max_output_tokens → output limit, max_steps without an answer → turn limit. An answer at max_steps (the last reply's text or the progress board's recovered answer) stays the result, marked harness_step_limit_reached.
    • The host /run path is unchanged.
  • NOOA (nooa_agent/app.py, runner.py, sandbox_runner.py, sandbox_entrypoint.py)
    • A sandboxed deadline now returns the worker's partial result as timeout_exceeded, decided with retry_deadline_before_reply=True. Before, it was a RuntimeError 500 and the partial result was lost.
    • A worker's failed run is returned rather than raised. So is an embedded run's failure.
    • Either one becomes agent_run_error, or model_transport_error when the model client's own record shows its last call got no reply (new model_transport_error field, carried through the worker result).
    • The bare HTTPException(503) is gone.
    • Lifecycle failures (supervisor, worker exit, capture, missing result) still raise.
    • Invalid policy output is failed agent_invalid_output (graded, as before).

A model 4xx other than 408/425/429 before any model reply is now model_request_rejected for all four (decision 4).

Two later commits close gaps that the scripted-model smokes found:

  • Context overflow (decision 1). Stirrup, NOOA and BrowseComp classify a failed model call with the shared model_http_error_outcome, which takes the endpoint's error body:

    • Stirrup's runner keeps the OpenAI SDK error's response.text;
    • NOOA carries the error's response_content through its run result, result.json and checkpoints;
    • BrowseComp reads response_content.

    So a context overflow the model server propagates (HTTP 400, code context_length_exceeded) is a graded incomplete context limit, before or after the first reply. It was failed model_request_error 400, or model_request_rejected on the first request. Nothing matches on message text. Hermes already read its own "Context length exceeded" result.

  • A harness that leaves no output (decisions 3 and 5). When Hermes', Stirrup's or NOOA's runner is killed or exits nonzero without writing its output, the ladder now answers 200 failed agent_run_error (retried) and keeps the partial work. Before, it raised a 500 and dropped the trajectory.

    • The receipt must show a nonzero exit or kill that was not the deadline, with no supervisor error, and a check in the sandbox must confirm the output file is missing.
    • These still raise: an output that exists but cannot be read, a clean exit with no output, exit 126/127 or no return code (the harness never started), a supervisor error, and a deadline.

Tests that pinned main's behaviour are updated, with the reason in a comment or the test name. Per-event tests assert the final status and ng_agent_outcome.

Issue: none; this is part of the step 1 migration that #5870 starts.

Disposition changes

Source of each "main" cell: code reading of main acb67734cc (the files are unchanged from #5870's base), cross-checked against main's tests named in parentheses.

Events: a context overflow (explicit, with vLLM's propagate flag on, or harness-detected) · b deadline before any reply · c deadline after a reply · d no usable result · e persistent 429/5xx · f 401 · g other 4xx before any reply · h refusal. ★ marks a row whose action changes.

Harness Event main: HTTP, status, ng_agent_outcome → action this PR → action
Hermes a 200 incomplete, stale model_context_limit → verify (test_context_limit_keeps_partial_work_verifiable) 200 incomplete, none → verify
Hermes b, c 200 incomplete → verify (test_runner_stopped_at_the_deadline_is_a_partial_response) same
Hermes d (runner exception) 500 → retry (test_close_preserves_runtime_gap_after_runner_error) 200 failed agent_run_error → retry
Hermes e 200 failed model_request_error 429/5xx → retry (test_provider_failure_is_reported_and_replays_without_rerunning) same
Hermes f 200 failed model_request_error 401 → fail before a reply model_request_rejected, after it 401 → fail
Hermes ★ g 400/422 before a reply 200 failed model_request_error 400 → verify 200 failed model_request_rejected → fail
Hermes h completed → verify same
Stirrup a (before or after a reply) 200 failed model_request_error 400 → verify (test_a_request_the_model_server_rejects_ends_the_run_as_failed_with_the_turns_so_far); on the first request it would be model_request_rejected 200 incomplete → verify
Stirrup b, c 200 incomplete → verify (test_a_supervisor_timeout_with_the_runners_wall_time_report_is_an_incomplete_response) same
Stirrup d (runner exception) 500 → retry (test_a_failed_run_still_reports_what_it_observed) 200 failed agent_run_error → retry
Stirrup e (also transport) 500, status lost → retry 200 failed model_request_error status / model_transport_error → retry
Stirrup ★ f 500 → retry (test_a_model_server_error_that_is_not_a_rejected_request_still_fails_the_run) 200 failed 401 / rejected → fail
Stirrup ★ g 400/413/422 before a reply 200 failed model_request_error → verify model_request_rejected → fail
Stirrup ★ g 403/404 500 → retry model_request_rejected → fail
Stirrup h graded → verify same
BrowseComp ★ a (before or after a reply) 200 failed model_request_error 400, output dropped → verify (test_a_model_http_error_is_a_failed_response_for_the_outcome_policy) 200 incomplete, partial trajectory kept → verify (graded on the partial answer)
BrowseComp b, c 200 incomplete (loop deadline) → verify same
BrowseComp d (error receipt) 500 → retry (test_the_sandbox_activation_clamps_its_deadline_and_fails_on_an_error_receipt) 200 failed agent_run_error → retry
BrowseComp e 200 failed model_request_error → retry; transport: 500 → retry same kind, partial kept; transport model_transport_error → retry
BrowseComp f 200 failed 401 → fail same, or rejected → fail
BrowseComp ★ g 400/413/422 before a reply model_request_error → verify model_request_rejected → fail
BrowseComp ★ token-count endpoint 4xx model_request_error 400 → verify / 404 → fail agent_run_error → retry
BrowseComp h graded → verify same
NOOA a (before or after a reply) 200 failed model_request_error 400 → verify (test_model_rejection_obeys_environment_policy_and_closes) 200 incomplete → verify
NOOA (sandboxed) b 500 → retry (test_worker_deadline_preserves_checkpoint_without_retryable_dependency_error) 200 failed unknown → retry
NOOA (sandboxed) ★ c 500 → retry, partial lost 200 incomplete with the partial → verify
NOOA (embedded) b, c no deadline; the episode timeout retries same (gap below)
NOOA d 500 (fatal) or 503 (transient) → retry (test_failed_activation_replays_error_and_returns_evidence_on_close) 200 failed agent_run_error / model_transport_error → retry
NOOA e 200 failed model_request_error 429/5xx → retry same
NOOA f 200 failed 401 → fail same, or rejected → fail
NOOA ★ g 400/413/422 before a reply model_request_error → verify model_request_rejected → fail
NOOA h (structured refusal = invalid output) 200 incomplete → verify 200 failed agent_invalid_output → verify

Scores change for:

  • 400/413/422 before any model reply in all four: graded → failed (decision 4).
  • Stirrup 401/403/404: retried → failed.
  • The BrowseComp partial trajectory on a 400: graded on it instead of on an empty output.
  • A context overflow on the first request, in Stirrup, NOOA and BrowseComp: kept graded (incomplete); without the context-limit rule, decision 4 would have failed it.
  • Hermes, Stirrup and NOOA runs whose harness left no output: still retried, but as HTTP 200 agent_run_error with the partial work, not a 500.
  • NOOA's sandboxed deadline after a reply: retried → graded.
  • A BrowseComp token-count 4xx: graded or failed → retried.

Other changes keep the action (500/503 → 200 with the same retry), or change only the status (incomplete ↔ failed, both graded).

Gaps left for step 5 (deadlines)

  • BrowseComp reads its time budget only from the seed's agent_timeout_sec (set by the harbor Environment Server), not from the task row's agent_timeout_sec metadata that Hermes, Stirrup and NOOA read through resolve_agent_timeout.
  • NOOA's embedded mode has no deadline of its own, so the episode timeout cancels it and the episode is retried.

No budget is invented here.

Not changed

  • Hermes's host path (_create_response, used by the host /run) keeps its old status logic; step 7 removes it.
  • BrowseComp's runner interrupted by its supervisor (the loop's own deadline did not fire) stays agent_run_error, not a timeout.
  • Harness model retries (decision 6), checked but not changed here:
    • Stirrup: only the OpenAI SDK's retries (max_retries=2, so 3 attempts, which include 409). Gym's DynamicMaxTokensChatCompletionsClient.generate overrides Stirrup's generate without its tenacity @retry.
    • Hermes (pinned): retries a 400 whose body message is empty or error.

Validation

Run on macOS against the worktree, with each adapter's pinned dependencies (stirrup 0.1.12, hermes-agent 26bb847a, nooa 19caab16) on the path:

  • Hermes hermes_agent/tests: 374 passed, 6 skipped, 1 failed. The failure is test_seed_import_check_ignores_task_hermes_home, which needs the sandbox's Hermes runtime and also fails on the base.
  • Stirrup stirrup_agent/tests: 166 passed, 20 failed.
    • All 20 fail the same way on the base: they run the shared Linux supervisor and GNU timeout.
    • test_sessions.py and the shell tests in test_sandbox_runner.py did not run here. That includes the updated test_a_failed_episode_still_closes_with_its_evidence.
  • BrowseComp browsecomp_agent/tests: 151 passed.
  • NOOA nooa_agent/tests: 758 passed, 10 skipped (Linux installer tests).
  • Context-overflow and no-output fixes (1ab389db79, 3771af49ad), run on a Linux host in each adapter's locked venv against the merge commit before them. Every test passed on both sides, including the Linux supervisor tests that fail on macOS:
    • Hermes: 381 → 394 passed.
    • Stirrup: 187 → 198 passed.
    • NOOA: 768 → 789 passed.
    • BrowseComp: 151 → 153 passed.
  • The new tests were also run against the old adapter code, and the ones that check the new behavior fail there.
  • pre-commit run --files <touched>: passed.

Smoke evidence

All runs are scripted-model smokes on a Linux host, with no real model. Gym's real vllm_model (propagate_context_overflow_errors: true) sits in front of a scripted upstream, and the action is the Environment Server's under the default policy.

Hermes, Stirrup and NOOA: harness conformance scenarios.

Scenario Hermes Stirrup NOOA
model_error (400 before a reply) failed model_request_error 400 → verify ⇒ model_request_rejected → fail same same
context_overflow A: incomplete with a stale model_context_limit → verify; B: incomplete → verify A, B: failed model_request_error 400 → verify; B′: incomplete → verify same as Stirrup
context_overflow_length A: failed agent_limit → verify; B: incomplete → verify incomplete → verify, unchanged same
deadline_before_reply incomplete → verify, unchanged same 500 → retry ⇒ failed unknown → retry (transitional rule)
deadline_after_reply incomplete → verify, unchanged same 500 → retry ⇒ incomplete → verify
harness_no_result A, B: 500 → retry; B′: 200 failed agent_run_error → retry same; B′ P0 trajectory checks fail (below) same as Hermes
model_401 failed model_request_error 401 → fail ⇒ model_request_rejected → fail 500 → retry ⇒ model_request_rejected → fail same as Hermes
model_503 failed model_request_error 503 → retry, unchanged 500 → retry ⇒ 200 failed model_request_error 503 → retry same as Hermes

Disposition changes A → B′: Hermes 1, Stirrup 2, NOOA 2. In B′, every rerun cell passes its P0 checks except Stirrup's harness_no_result. There the outcome is right (200 failed agent_run_error, retried), but the failure row has no invocation and no turns. Stirrup's runner reports its observations only in output.json, which a killed run never writes. That gap was already there on A, hidden behind the 500. It is trajectory capture, not the ladder, and it is left for a follow-up.

BrowseComp (not in the conformance registry): a driver over the session routes, with the Docker sandbox provider.

Event A B B′
ok completed → verify same same
400 on the first request failed model_request_error 400 → verify failed model_request_rejected → fail same
400 after a reply failed model_request_error 400, 0 output items → verify same, 2 items kept → verify not rerun
401 failed model_request_error 401 → fail failed model_request_rejected → fail not rerun
503 failed model_request_error 503 → retry same not rerun
context overflow, first request failed model_request_error 400 → verify failed model_request_rejected → fail incomplete → verify
context overflow after a reply failed model_request_error 400 → verify same incomplete, 2 items kept → verify
model never answers, 45 s deadline incomplete → verify same not rerun
runner SIGTERM 500 → retry 200 failed agent_run_error → retry not rerun
runner SIGKILL, no receipt 500 → retry same (a lifecycle failure) not rerun

Counts over these 10 events: A verify 6, retry 3, fail 1. B′ verify 5, retry 3, fail 2.

Decision 6 (harness retries), found by the smokes and not changed here:

  • NOOA's own retry loop sends a 400 or a 401 ten times. Gym's model client in gym_llm retries only 429.
  • Hermes sends a plain 400 three times.

A graded response (completed or incomplete) carries no error: #5870's finish_response clears it, so a context-limit response no longer keeps the model call's error. Hermes keeps its own text in metadata["hermes_error"].

Merge with #5870 (12bfb2745b)

#5870's head (94d20acf69, which carries main up to #6160) is merged in. What changed here:

  • Stirrup turn limit. The base now has fix(stirrup): report a run that exhausts its turns as stop_reason max_turns #5937: the runner reports stop_reason="max_turns" when Stirrup runs out of turns. _run_evidence reads the turn limit from that stop reason (it looked for an incomplete run without one), so such a run stays incomplete agent_limit instead of failing as agent_run_error. Conflict resolution also keeps the base's agent_timeout_sec echo.

  • BrowseComp stop reasons (feat(browsecomp): port RL caching, stop reasons, and lifecycle logs #6088): mapped as described above.

  • Tests. The context-overflow tests now assert error is None. New: BrowseComp session rows for each loop end and for a 400 after an empty-answer retry; Stirrup's missing-output guard; both Hermes truncation errors; NOOA's agent_limit vs output_limit rows. The new BrowseComp rows fail on the code before the fix.

  • Health check (090cab9d00, nemo_gym/rollouts/health/checks.py). A 400 before any reply is now a failure row, so rollout_token_count_mismatch reads usage from _ng_failure_partial_response when the row has no response. Without it, CI's Hermes and Stirrup conformance model_error scenario reported the known zero usage as unobserved (P0). Same change as refactor(agent): move Claude Code, Codex and OpenCode to the outcome ladder #5877's b9249e3.

Known base failure: tests/unit_tests/test_moved_paths.py::test_every_recorded_name_still_resolves_at_its_old_path (nemo_gym.harness_capabilities.behavior.MODEL_REQUEST_ERROR) fails on #5870's head too; the MOVED_NAMES entry belongs in #5870.

Validation at 12bfb2745b, Linux host, each adapter's locked venv: Hermes 426 passed, Stirrup 218 passed, NOOA 790 passed, BrowseComp 174 passed. pre-commit run --files <touched> passed.

Stirrup conformance smoke at the merge commit (scripted model, no real model, Linux, local sandbox provider):

Scenario Response Environment Server action
tool_success completed graded, reward 1
verifier_failure completed graded, reward 0 (task failure scored)
deadline_after_reply incomplete, timeout (wall_time) graded
context_overflow incomplete, context_limit graded
model_503 failed model_request_error 503 retried, then dropped from the score
harness_no_result (killed runner) failed agent_run_error retried, then dropped from the score
model_error (400), model_401 failed model_request_rejected failed, not retried

Every scenario passes its P0 checks except the known harness_no_result trajectory gap described above.

🤖 Generated with Claude Code

yaoyu-33 and others added 3 commits November 9, 2026 11:36
…come ladder

Each of these adapters decided its own response for the same events: Hermes
flipped a context limit to incomplete and left a stale model_context_limit,
Stirrup re-raised 401/403/404/429/5xx and transport errors as a 500 that lost
the status, BrowseComp wrote ng_agent_outcome by hand and dropped the partial
trajectory on a model error, and NOOA answered a sandboxed deadline with a 500
and every transient failure with a bare 503.

Each adapter now fills a RunEvidence from its own records and returns
finish_response with HTTP 200; launch, supervisor, capture and unreadable
artifact failures still raise.

- Hermes: the runner's result maps to context limit, wall_time deadline, turn
  and output limits and the classified error; a runner exception is
  agent_run_error instead of a 500.
- Stirrup: the runner keeps every APIStatusError's status and records a
  transport error; a runner exception is agent_run_error instead of a 500.
- BrowseComp: a model call that fails after Gym's client retries ends the run
  with the trajectory so far, classified by status or as a transport error; a
  token-count failure is no longer reported as a model error.
- NOOA: a sandboxed deadline returns the worker's partial result as a timeout
  (a deadline before any reply stays retried); a failed run is agent_run_error
  or model_transport_error instead of a 500 or 503.

A model 4xx other than 408/425/429 before any model reply is now
model_request_rejected for all four.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
…opped

The ladder now lets a run the session's close cancelled set
RunEvidence.stopped (incomplete, stop reason stopped, no ng_rollout_stop).
Both runners record that case as stop_reason cancelled, which main reported
as incomplete.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

…-python-host-adapters

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
yaoyu-33 and others added 2 commits November 9, 2026 16:41
…BrowseComp

Scripted-model smokes showed these adapters classifying a context overflow by
its HTTP status alone: model_request_rejected (failed, not graded) on the first
request and model_request_error 400 after a reply. Gym's model servers answer
an overflow they propagate with HTTP 400 and OpenAI's error envelope, code
context_length_exceeded, and a context limit is graded as incomplete.

Each adapter now classifies a failed model call with
model_http_error_outcome(status, error_body=...), reading the endpoint's own
error body:

- Stirrup: the sandbox runner keeps the OpenAI SDK error's response text as
  model_error_body next to model_error_status.
- NOOA: the run result, the worker's result.json and its checkpoints keep the
  rejected call's response_content as model_error_body.
- BrowseComp: the aiohttp ClientResponseError's response_content.

Any other failed request keeps its status, so the outcome of every other 4xx
and 5xx is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
…s, Stirrup and NOOA

Scripted-model smokes killed each harness before it wrote its output. Hermes
and Stirrup raised "sandbox runner exited without output" from artifact
capture, and NOOA raised "worker did not exit successfully (exit 137)", so the
agent answered HTTP 500 and the rollout's trajectory was dropped. A harness
that exits nonzero or leaves no result is a failed run, agent_run_error, which
the Environment Server retries by default.

When the supervisor's receipt shows the runner ended on its own (a nonzero
exit or a kill, not the deadline, no supervisor error, not a command that
could not start) and the output file is absent, the adapter now finishes the
run through the outcome ladder with no result and returns HTTP 200:

- Hermes and Stirrup: artifact capture returns the runner's error in place
  of raising; Stirrup's response then has no observations.
- NOOA: the sandbox runner returns the run with whatever checkpoint or final
  result the worker left, ended as an infrastructure error.

Absence is checked with a probe in the sandbox, because some providers report
a missing file as a generic transfer error. These stay typed raises: an output
that exists but cannot be read or parsed, a missing output after a clean exit,
a supervisor error, a negative or missing cleanup receipt, a provider exec
error, and a deadline (a timed-out run is never agent_run_error).

Tests that pinned the raise for a killed NOOA worker now assert the returned
run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
yaoyu-33 added a commit to yaoyu-33/Gym that referenced this pull request Nov 15, 2026
Pinned Hermes also ends a run with `partial: true` and "Model used all
output tokens on reasoning with none left for the response. ..." when a
length stop leaves no visible text, which is the usual shape for a
reasoning model cut off mid-reasoning. Classify it as `agent_limit`
beside the exhausted-continuation case.

Keep every Hermes output-limit error in one `_OUTPUT_LIMIT_ERRORS` set,
the name NVIDIA-NeMo#5879 also defines, so its rebase conflicts on one list
instead of merging two.

Add an episode-level test through `_run_sandbox_episode` that pins the
reported `ng_agent_outcome`, and check the attached outcome in the
classification test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
@svcnvidia-nemo-ci svcnvidia-nemo-ci added support User questions, support, or maintenance requests area:agent Agent harnesses and Responses API agent behavior labels Nov 16, 2026
katerynaCh pushed a commit to katerynaCh/Gym that referenced this pull request Nov 17, 2026
…s output limits (NVIDIA-NeMo#6204)

* fix(hermes): classify exhausted continuations as output limits

Signed-off-by: yaoyu-33 <[email protected]>

* fix(hermes): classify exhausted reasoning budgets as output limits

Pinned Hermes also ends a run with `partial: true` and "Model used all
output tokens on reasoning with none left for the response. ..." when a
length stop leaves no visible text, which is the usual shape for a
reasoning model cut off mid-reasoning. Classify it as `agent_limit`
beside the exhausted-continuation case.

Keep every Hermes output-limit error in one `_OUTPUT_LIMIT_ERRORS` set,
the name NVIDIA-NeMo#5879 also defines, so its rebase conflicts on one list
instead of merging two.

Add an episode-level test through `_run_sandbox_episode` that pins the
reported `ng_agent_outcome`, and check the attached outcome in the
classification test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

---------

Signed-off-by: yaoyu-33 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
yaoyu-33 and others added 2 commits November 17, 2026 16:07
…-python-host-adapters

Resolve the Stirrup conflicts: keep the ladder's metadata (an optional
elapsed_seconds and stop_reason) and add the agent_timeout_sec key and
resolve_agent_timeout from the base.

The base now carries #5937, whose runner reports stop_reason="max_turns"
when Stirrup runs out of turns. Read the turn limit from that stop reason
instead of from an incomplete run without one, so such a run stays
incomplete (agent_limit) instead of failing as agent_run_error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
…he merged ladder

After merging #5870, finish_response clears error on every graded response,
so the Hermes, Stirrup and BrowseComp context-overflow tests now assert that
an incomplete context-limit response has no error (Hermes keeps its own text
in metadata["hermes_error"]).

BrowseComp's session loop built its evidence from the reply's status alone,
so the stop reasons #6088 records were lost: a context_full length cut was an
output limit, and a run that hit max_steps without an answer was completed.
The evidence now reads the loop's stop_reason: context_full is a context
limit, max_output_tokens an output limit, and max_steps a turn limit, or, when
the run still has an answer, a result marked harness_step_limit_reached. A
failed response's error is a ResponseError instead of a plain dict.

Also cover Stirrup's missing-output guard, both Hermes truncation errors and
NOOA's limit rows (agent_limit vs output_limit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
@yaoyu-33

Copy link
Copy Markdown
Contributor Author

/ok to test 12bfb27

@yaoyu-33
yaoyu-33 marked this pull request as ready for review November 18, 2026 00:39
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 18, 2026 00:39
…e row

This PR reports a 4xx before any model reply as model_request_rejected,
which the Environment Server fails instead of grading. The episode then
ends as a failure row whose failed response is
`_ng_failure_partial_response`, so `rollout_token_count_mismatch` found no
transcript usage and the Hermes and Stirrup conformance `model_error`
scenarios reported it unobserved instead of healthy (P0). Read the partial
response when the row has no `response`, as rollout recovery already does.

Same change as b9249e3 on #5877 (its health-check part), so the two
branches merge cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
@yaoyu-33

Copy link
Copy Markdown
Contributor Author

/ok to test 090cab9

This branch was previously deployed

1 inactive (outdated) deployment
public — 3771af49 Deployed Nov 10, 2026 by yaoyu-33 via release / finalize / notify #11253
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior needs-review PR is ready for code review and waiting on a reviewer sla:triage-overdue Review assignment is over the one-business-day SLA support User questions, support, or maintenance requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants