Repository navigation
Conversation
Neither adapter classified a model error. Pool raised every model error, a deadline before any reply and a run without a result as a 500 that lost the status; LangGraph answered every model error with a 500. Each now fills a RunEvidence and returns finish_response with HTTP 200. - Pool: the in-sandbox model proxy records how the last model call failed (its HTTP status, or a transport error) until a later call completes. A model_next_tool_call_http_error exit is classified from that record. A deadline is graded after a reply and stays retried before one; a deadline while the last model call had failed with 408/425/429/5xx or got no reply is that infrastructure fault (retried). A launch, supervisor or unreadable trajectory failure still raises. - LangGraph: the graph runs on its values stream, so a model call that fails after Gym's client retries ends the run with the finished steps' outputs, classified by its status or as a transport error. A confirmed policy response timeout keeps its typed failure, and other exceptions stay the adapter's 500. A model 4xx other than 408/425/429 before any model reply is now model_request_rejected for both. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…-pool-langgraph Signed-off-by: yaoyu-33 <[email protected]>
…-pool-langgraph Signed-off-by: yaoyu-33 <[email protected]>
…t limit With `propagate_context_overflow_errors` on, Gym's model server answers a context overflow with HTTP 400 and OpenAI's error envelope, code `context_length_exceeded`, which `raise_for_status` keeps on the error as `response_content`. LangGraph reported it as `model_request_rejected` on the first request (failed) and `model_request_error` 400 after a reply. It is now `model_context_limit`, so the outcome ladder answers `incomplete` and the run is graded, before or after the first reply (decision 1). An incomplete response no longer carries the model call's error. A 400 with another code stays a model request error. Found by a scripted-model smoke through Gym's vLLM model server. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…-pool-langgraph Signed-off-by: yaoyu-33 <[email protected]>
…tp_error_outcome The shared helper replaces LangGraph's own reading of the model server's error envelope. Behavior is unchanged: a propagated context overflow is still a graded `incomplete` context limit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Pool's events carry no HTTP status, so its model proxy records how the last model call failed. It kept only the status, so a context overflow the model server propagates (HTTP 400, OpenAI code `context_length_exceeded`) was `model_request_rejected` on the first request and `model_request_error` 400 after a reply. The proxy now also keeps the first 4 KB of the failed reply's body, and `classify_outcome` passes it to the shared `model_http_error_outcome`. The overflow is then `model_context_limit`: `incomplete` and graded, before or after the first reply (decision 1). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…led model call This Linux-only lifecycle test still expected the RuntimeError (HTTP 500) that a deadline before any model reply raised before the outcome ladder. Pool's proxy records the stalled call as a transport failure, so the ladder answers HTTP 200 failed `model_transport_error`, which is retried. The test was skipped on macOS, where the earlier runs of this PR's tests were made. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
This was referenced Nov 10, 2026
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.
Stacks on #5870 (the shared outcome ladder). The base is
feat/agent-outcome-ladder, so this diff shows only Pool and LangGraph. Merge #5870 first. It is independent of the Hermes/Stirrup/BrowseComp/NOOA PR; the two were split to keep each under about 1,000 changed lines.What changed and why
Neither adapter classified a model error. Pool raised every model error, a deadline before any reply, and a run without a result as a 500 that lost the status. LangGraph answered every model error with a 500.
Each now fills a
RunEvidenceand returnsfinish_response(...)with HTTP 200.pool_agent/sandbox_runner.py,sandbox.py,app.py)model_calls.json, how the last model call failed: its HTTP status and the first 4 KB of its body, ortransportwhen no reply came. A later completed call clears it.model_next_tool_call_http_errorexit is classified from that record through the sharedmodel_http_error_outcome:model_request_errorwith the status,model_context_limitfor a 400 whose body is the model server's context-overflow envelope (codecontext_length_exceeded),model_transport_error, orunknownwithout a record. Pool's own events carry no status.session.errorisunknown(decision 5). A run that exits withoutexit_tool_called, with a bad exit code or with an incomplete trajectory isagent_run_error.retry_deadline_before_reply=True). A reply is a completed model call in the proxy record or any model output in the trajectory.infra_fault, and the run fails with that kind and is retried. A 4xx other than 408/425/429 is not infrastructure evidence.langgraph_agent/app.py)valuesstream; the last value is whatainvokereturned.model_http_error_outcomefrom its status and the error body Gym's client keeps (response_content), or asmodel_transport_error. A propagated context overflow is therefore a gradedincompletecontext limit, with noerroron the response. Parallel paths whose failures are all model errors report the first one.A model 4xx other than 408/425/429 before any model reply is now
model_request_rejectedfor both (decision 4).Tests that pinned main's raises (
pool_agent/tests/test_app.py, the old 868-893 and its neighbours) are updated, with the reason in the test. New tests cover: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(pool_agent/app.py_activate,langgraph_agent/app.py_invoke_graph), cross-checked against main's tests in parentheses.Events: a context overflow (vLLM's propagate flag on) · 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.
ng_agent_outcome→ actiontest_runtime_failure_is_not_returned_as_a_gradable_response)test_timeout_without_trajectory_requires_completed_model_response)unknown→ retrytest_confirmed_timeout_keeps_partial_output_gradable)infra_fault) → retrytest_recorded_model_failure_overrides_timeout_and_preserves_diagnostics)session.erroror unknown exit reasontest_timeout_does_not_hide_unknown_terminal_failure)test_runtime_errors_cannot_be_disguised_as_gradable_partials)agent_run_error→ retrymodel_request_errorstatus /model_transport_error→ retrymodel_request_rejected→ failtest_graph_optional_grants_and_failed_activation_closepins the 500)model_request_errorstatus /model_transport_error→ retrymodel_request_rejected→ failScores change for:
session.erroror an unknown exit.Gaps left for step 5 (deadlines)
LangGraph has no deadline of its own: the episode timeout cancels it and the episode is retried. No budget is invented here.
Validation
Run on macOS against the worktree (LangGraph with
langchain-core==1.7.3andlanggraph==1.2.18on the path):tests/unit_tests/agents/test_outcome_ladder.py: 248 passed, 12 skipped.POOL_TEST_BINARY). They did not run here.RuntimeErrorfor a deadline on a stalled model call, and it now expects the ladder's answer: failedmodel_transport_error, retried, because the proxy recorded the stall as a transport failure.pre-commit run --files <touched>: passed.Smoke evidence
Scripted-model smoke of LangGraph (reflection agent) on a Linux host, with no real model. A driver ran the session routes (seed, activation with the session cookie, close) in front of Gym's real
vllm_model(propagate_context_overflow_errors: true) and a scripted upstream. The action is whatagent_response_actionreturns under the default policy.main's adapter plus the ladder core).ddd2c15132.3f90fb356a).model_request_rejected→ failmodel_request_error400 → verifymodel_request_rejected→ failmodel_request_error503 → retry (3 upstream calls, allvllm_model's)model_request_rejected→ failerror→ verifymodel_request_error400 → verifyerror→ verifyCounts over these 7 events: A verify 1, retry 6. B′ verify 4, retry 1, fail 2. The deadline and kill events do not apply: LangGraph has no deadline of its own and no separate harness process.
Pool was not run. Its install accepts Poolside's EULA (
accept_pool_eula), which needs the user's own consent. Pool's rows above come from the tests, not a smoke.🤖 Generated with Claude Code