Repository navigation
PinchBench: preserve OpenClaw timeout (DCO-clean replacement) - #2211
Merged
AWarno merged 8 commits intoJul 31, 2026
Merged
Conversation
OpenClaw aborts a model request when the endpoint is idle for its stream-idle watchdog window (DEFAULT_LLM_IDLE_TIMEOUT_MS = 120s). Under high concurrency or with slow / self-hosted endpoints this fails legitimate-but-slow generations with [llm-idle-timeout]. Add openclaw_provider_timeout_seconds to the PinchBench agent config. It maps to OpenClaw models.providers.<id>.timeoutSeconds, which governs the request timeout and the stream-idle watchdog and (unlike agents.defaults.timeoutSeconds) is not clamped back to 120s. Applied without rebuilding the image: instance mode injects it into the in-container lib_agent.py before run_task.sh; direct_exec writes it into the generated openclaw.json. README documents the knob + usage. Co-Authored-By: Claude Opus 4.8 <[email protected]> Signed-off-by: Haran Kumar Shiv Kumar <[email protected]>
Signed-off-by: Anna Warno <[email protected]>
Signed-off-by: Anna Warno <[email protected]>
Signed-off-by: Anna Warno <[email protected]>
Signed-off-by: Anna Warno <[email protected]>
Signed-off-by: Anna Warno <[email protected]>
Signed-off-by: Anna Warno <[email protected]>
OlegSudakov
pushed a commit
to OlegSudakov/Gym
that referenced
this pull request
Aug 7, 2026
…-NeMo#2211) Replacement for NVIDIA-NeMo#2193 because the original branch cannot be force-pushed under the repository rules, and one commit in that history was missing DCO. This branch is rebuilt on current `main` with the same PinchBench timeout changes and DCO trailers on all commits. Notes: - Adds/keeps `openclaw_provider_timeout_seconds` for PinchBench. - Keeps the OpenClaw agent timeout ceiling fix. - Updates the baked PinchBench patch hunk counts. - DCO-clean commit range: all commits include `Signed-off-by`. --------- Signed-off-by: Haran Kumar Shiv Kumar <[email protected]> Signed-off-by: Anna Warno <[email protected]> Co-authored-by: Haran Kumar Shiv Kumar <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]>
kslowik
added a commit
that referenced
this pull request
Aug 10, 2026
…he config
`agents.list[N].timeoutSeconds` is not a key OpenClaw 2026.6.5 accepts -- the
version pinned in Dockerfile.benchmark. Its schema is strict, so the one unknown
key invalidates the whole config file:
[reload] config reload skipped (invalid config):
agents.list.1: Unrecognized key: "timeoutSeconds"
The gateway then never registers the benchmark agent, so the agent never runs:
`Total API requests: 0`, no transcript, and every task scores 0 -- while the run
exits 0 with a full set of rollouts, so it reads as a very bad model rather than
a broken harness.
Introduced in f9a873d (#2211). Verified by A/B on one task, same image and
endpoint, toggling only this line:
with the line reward 0.0, transcript_event_count 0
without the line reward 1.0, transcript_event_count 7
The two sibling writes added by the same commit are kept -- OpenClaw accepts
both, and the passing run had them in place:
providers.custom.timeoutSeconds
agents.defaults.timeoutSeconds
The second of those already applies the timeout to every agent, so #2211's
intent survives; the per-agent write was redundant as well as fatal. Hunk header
adjusted from +322,110 to +322,109 so the patch still applies.
kslowik
added a commit
that referenced
this pull request
Aug 11, 2026
…he config
`agents.list[N].timeoutSeconds` is not a key OpenClaw 2026.6.5 accepts -- the
version pinned in Dockerfile.benchmark. Its schema is strict, so the one unknown
key invalidates the whole config file:
[reload] config reload skipped (invalid config):
agents.list.1: Unrecognized key: "timeoutSeconds"
The gateway then never registers the benchmark agent, so the agent never runs:
`Total API requests: 0`, no transcript, and every task scores 0 -- while the run
exits 0 with a full set of rollouts, so it reads as a very bad model rather than
a broken harness.
Introduced in f9a873d (#2211). Verified by A/B on one task, same image and
endpoint, toggling only this line:
with the line reward 0.0, transcript_event_count 0
without the line reward 1.0, transcript_event_count 7
The two sibling writes added by the same commit are kept -- OpenClaw accepts
both, and the passing run had them in place:
providers.custom.timeoutSeconds
agents.defaults.timeoutSeconds
The second of those already applies the timeout to every agent, so #2211's
intent survives; the per-agent write was redundant as well as fatal. Hunk header
adjusted from +322,110 to +322,109 so the patch still applies.
Signed-off-by: Jakub Slowikowski <[email protected]>
laszkiewiczp
added a commit
that referenced
this pull request
Aug 12, 2026
… key, clamped run ceiling, coupled knobs (#2477) Fixes [GYMBUGS-26](https://linear.app/nvidia/issue/GYMBUGS-26). PinchBench generates OpenClaw's `openclaw.json`. Three defects in how timeouts were written there, plus one new knob. ## 1. `timeoutSeconds` on `agents.list[N]` invalidated the whole config OpenClaw `2026.6.5` validates agent list entries with a strict schema, so the key added in #2211 is rejected as unknown and **the entire document fails validation**. The agent never starts and every task scores 0 — uniformly, since the config is written once per agent, not per task. Reproducible without a GPU (`npm i [email protected]`), one key is the entire difference: | `agents.list[0]` | `openclaw config validate` | | --- | --- | | `{id, model}` + `agents.defaults.timeoutSeconds` | `Config valid` | | `{id, model, timeoutSeconds}` + same defaults | `agents.list.0: Invalid input` | Nothing consumed it either — both readers resolve from `defaults` (`opts.cfg.agents?.defaults?.timeoutSeconds ?? 600`). It was inert *and* fatal. The baked patch was the wider break: `provider_timeout_s` defaulted to `120` there, so it wrote the key on **every run with no env override**, onto the entry `ensure_agent_exists` creates. Any image rebuilt from `main` was broken out of the box. ## 2. The run ceiling was clamped to 120s The same patch wrote that 120s default to `agents.defaults.timeoutSeconds`. In gateway mode — the mode PinchBench runs — that key is the **whole-run ceiling**: `parseTimeoutSeconds()` feeds `resolveGatewayAgentTimeoutMs()` and falls back to 600s when absent. So every run that did not set the variable had its ceiling cut 600s → 120s. All 147 tasks have a harness budget of at least 180s (`task.timeout_seconds` × `timeout_multiplier`), so **every task was being cut short**, and because OpenClaw aborts from the inside the partial work grades as a *failure* rather than surfacing as a *timeout*. Now: the 120s provider watchdog default stays (it matches OpenClaw's own); the ceiling is written only when explicitly provided. ## 3. One field drove two unrelated bounds `openclaw_provider_timeout_seconds` set both the per-request stream-idle watchdog and the whole-run ceiling. They want opposite values — a watchdog tight enough to notice a hung generation, a ceiling loose enough not to pre-empt the harness — so no single value was usable. - `openclaw_agent_timeout_seconds` → `agents.defaults.timeoutSeconds` - `openclaw_judge_timeout_seconds` → `DEFAULT_JUDGE_TIMEOUT_SECONDS`, previously hardcoded at 300s, ignored by `timeout_multiplier`, and unreachable from the benchmark config despite running a full OpenClaw session ## 4. Configurable stalled-run abort threshold `openclaw_stuck_session_abort_seconds` → `diagnostics.stuckSessionAbortMs`. Unset, OpenClaw computes `max(5 min, 3 × stuckSessionWarnMs)` = 300s of no-progress, which is inside the budget of 98 of 147 tasks. Verified `diagnostics.stuckSessionAbortMs` is accepted by the same strict schema. ## Verification - Schema A/B against `[email protected]` (above), plus `diagnostics.stuckSessionAbortMs` validated the same way. - Patch **regenerated** from the patched tree rather than hand-edited; it now spans `lib_agent.py` and `lib_grading.py` and applies to `pinchbench/[email protected]` (`git apply --check`). - Image built from this branch; baked `lib_agent.py` has zero `agent["timeoutSeconds"]`, with provider / `agents.defaults` / `tools.web.search` writes intact. - End-to-end on oci-hsg with the rebuilt SIF and this branch pinned as the Gym revision: **20/20 rollouts, 0 failures**, tool calls present, all five knobs verified in-job. - 84 tests pass. The timeout tests execute the config script the wrapper carries against a seeded `openclaw.json` containing an `agents.list` entry, and assert on the resulting JSON — a seeded entry is required, since with an empty list the buggy loop is a no-op and any test would pass either way. ## Note On current `main` this is masked by an earlier issue: `ea4c6c6c9` raised `requires-python` to `>=3.13.14` while the gym-runtime image ships CPython 3.12.13, so trunk dies at `uv venv` before OpenClaw is invoked. Fixing the image alone exposes these immediately. --------- Signed-off-by: plaszkiewicz <[email protected]>
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.
Replacement for #2193 because the original branch cannot be force-pushed under the repository rules, and one commit in that history was missing DCO.
This branch is rebuilt on current
mainwith the same PinchBench timeout changes and DCO trailers on all commits.Notes:
openclaw_provider_timeout_secondsfor PinchBench.Signed-off-by.