Repository navigation
feat(openclaw): upgrade the agent to 2026.11.5 and retain session transcripts - #6457
Conversation
…nscripts Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Fix what the review of the 2026.11.5 upgrade found: - Sandbox prompt images: name each staged image by its absolute path on its own line. 2026.11.5 blanks the `[Image: source: <path>]` marker, so no image reached the model. Both pins attach the bare path. - MCP grant tools: set `tools.toolSearch: false`. 2026.11.5 enables tool search by default and hides grant tools behind tool_search/dispatch_action; 2026.6.11 accepts the key and the tool list matches 2026.6.11 again. - Host transcript export: a failed, timed-out or impossible export now keeps the CLI's final answer instead of escaping as an agent timeout that pads an empty, scored response. The launcher comes from `command`, the export is bounded after SIGTERM, and `--session-id` is passed unless extra_args choose the session themselves. - Host install: an existing launcher is kept only when its Node satisfies the release's engine range; 2026.11.5 prints its version on Node 22. - Reasoning tokens: report them only from per-call transcript counts; the envelope total counts a call without one as zero. - Memory search: move to `memory.search` from 2026.8.1, the first tag with the upstream migration. - Exporter: stop itself before the caller's deadline, skip a session with an unusable id instead of aborting, and stage it with the activation. - Node ranges: follow npm for caret and tilde ranges; refuse hyphen ranges. - Keep DeepSearchQA and WideSearch on 2026.6.11: they run the OpenClaw agent of a pinned Gym archive on a Node 22 image. - Docs: state the 2026.11.5 defaults, probe exit codes, child-process groups, the pinned release and the scope of training capture. - Tests: cover the host SQLite branch, the sandbox SQLite fallback, reasoning tokens, the memory and tool-search settings, the runtime check, npm ranges, the Node check on reuse and the deps scripts' Node replacement. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
OpenClaw 2026.11.5 runs exec-tool commands through its native process helper (@openclaw/proc-safe), whose glibc build needs glibc 2.33 or newer. On an older glibc the helper does not load and every exec call fails with "native child reaping is unavailable", which an episode would then score. The sandbox installer now checks that the helper loads, on a fresh install and when it reuses a cached runtime, and exits 3 with an explicit message; session setup turns that into a 422 refusal. The preinstalled-runtime probe runs the same check. Releases without the helper, such as 2026.6.11, pass. The README states the glibc floor for task images and for the local CLI's host. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 062a3a2 |
… 2.1 preset OpenClaw 2026.11.5's exec tool needs glibc 2.33. Of the 89 pinned Terminal-Bench 2.1 task images, qemu-alpine-ssh and qemu-startup ship glibc 2.31, so session setup refuses those two tasks on the adapter's new default. Add the terminal_bench_2_1/openclaw Harbor preset, which pins OpenClaw 2026.6.11 (it runs on all 89 images), and point the benchmark README's --agent-type note and harness table at it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test f1825c2 |
The OpenClaw conformance job's error regressions failed on 2026.11.5:
- A failed model run now exits 1 instead of throwing 2026.6.11's
FailoverError. A rejected request prints an `{"ok": false, "error": ...}`
envelope; a model idle timeout or context overflow prints the result
envelope with `meta.error`. The adapter raised a 502 for both instead of
returning the failed response with its outcome. Accept either envelope as
the terminal diagnostic, still only when the transcript ends in the model
error or the envelope reports a context overflow.
- 2026.11.5 retries a rate limit up to 15 times. Sandbox sessions run
behind Gym's model server, which retries upstream failures itself, so the
agent's session settings keep 2026.6.11's two same-model retries.
- The regression probe typed every HTTP failure as invalid_request_error;
2026.11.5 does not retry a 5xx with that type. Type 5xx errors as Gym's
model server does (server_error). With two same-model retries, each
transport failure (reset, stream cut, idle timeout) now makes 3 requests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 1f8fab7 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
I found four RISKs in non-root session staging and host transcript recovery. Each has a concrete failure case and proposed acceptance checks below.
I completed a static review of all 31 changed files and their affected paths. I did not execute tests or independently reproduce the supplied rollout evidence.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
- Sandbox preparation creates home/.openclaw/agents/main/agent as the sandbox user. The settings upload that keeps two same-model retries otherwise created agents/main and agents/main/agent as root on Docker, so a non-root sandbox user could not write its sessions or SQLite store. - A failed or timed-out transcript export removes its destination, so a partial transcript cannot replace the envelope's final answer. - The exporter runs the OpenClaw that `command` runs. A one-word command is the launcher, under `node` from PATH. A longer command uses its interpreter and the entrypoint path it names. A package runner such as `npx openclaw` names no entrypoint, so the export is skipped and the response keeps the final text; the README says so. - A stopped run looks up the session id that extra_args pass with --session-id instead of the newest exported transcript. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 1951757 |
|
Notes from a local review (with repro tests) and paired rollouts against main:
|
Signed-off-by: yaoyu-33 <[email protected]>
|
Addressed all three findings in
On Linux with Python 3.13.14, nine regression cases failed on the previous head. The fixed tree passed all 679 OpenClaw tests (including the pinned CLI), all 106 AnyTerminal tests, and Two real-model runs used AnyTerminal's generated runner on Debian Bullseye (glibc 2.31). Both retained the successful |
|
/ok to test f6a2126 |
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 03890fb |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/45700144453 |
Change
Upgrade the OpenClaw agent, both training environment configs, the GDPVal and SWE-Atlas QA configs and the AnySWE path from 2026.6.11 to 2026.11.5. The sandbox installer and portable dependency scripts now provision Node 24.22.3 LTS. This satisfies the package engine range
>=24.16.0 <25 || >=26.1.0. The sandbox installer checks Node archives against the distributor's SHA-256 list. Preinstalled runtimes are checked against the exact package version and its declared engine range.The release moved agent history into per-agent SQLite stores and moved the memory search setting. Gym uses the installed OpenClaw transcript SDK to recover the session events and tool call identities after the worker stops. It retains the JSONL reader for older releases and requests streaming usage for the host path. This addresses the transcript blocker recorded in #3621. No separate issue is needed for this scoped release update.
Harbor has to handle the same storage change. Its OpenClaw agent on
mainstill copiesagentMeta.sessionFile. Since 2026.8.1 that field holds a session key rather than a file path, so Harbor's OpenClaw trajectories keep only the final answer (harbor-framework/harbor#3031). The open fix, harbor-framework/harbor#2327, uses@openclaw/openclaw-atifto run OpenClaw's documentedopenclaw sessions export-trajectory. That command writes a support bundle: it removes image data, local state paths and secret-like fields, and it truncates event lines over 256 KiB. Gym needs the exact tool results and prompt images, soexport_sessions.mjsreads the raw session events throughopenclaw/plugin-sdk/session-store-runtimeandopenclaw/plugin-sdk/session-transcript-runtime. It writes them in 2026.6.11's JSONL layout, so the JSONL reader still parses them. The transcript module is exported without published types, so a later release may change it. Three things guard against that: the version is pinned exactly, the adapter tests run the real CLI's SQLite export, and a failed export keeps the CLI's final answer.The review round fixed what 2026.11.5 changed beyond storage:
[Image: source: <path>]marker, so sandbox prompt images never reached the model. The adapter now names each staged image by its absolute path on its own line; 2026.6.11 and 2026.11.5 both attach it.tool_search/tool_describe/dispatch_action. The generated config setstools.toolSearch: false, so the model sees the same tools as on 2026.6.11 (<grant>__<tool>stays directly callable).commandruns: a one-word command is the launcher, and a longer command uses its interpreter and the entrypoint path it names. It is bounded after SIGTERM, stops itself before the caller's deadline and skips a session with an unusable id.--session-idis passed unlessextra_argschoose the session; a stopped run thatextra_argsgive one--session-idreads that session's history.onboardandagent, so an existing launcher is reused only when its Node satisfies the release's engine range.exec. 2026.11.5 runs exec-tool commands through a compiled process helper (@openclaw/proc-safe) whose glibc build needs glibc 2.33 or newer. On an older glibc everyexeccall fails with "native child reaping is unavailable", and the episode would be scored. The sandbox installer now checks that the helper loads (fresh install and cached runtime) and session setup refuses such an image with HTTP 422; the preinstalled-runtime probe runs the same check. 2026.6.11 has no helper and passes.FailoverErrorwhen a model call fails: it exits 1 after printing{"ok": false, "error": ...}for a rejected request, or its result envelope withmeta.errorfor a model idle timeout or context overflow. The adapter accepts either envelope as the terminal diagnostic, still only when the transcript ends in the model error or the envelope reports a context overflow, so the Environment Server receives the failed response with its typed outcome instead of a 502. 2026.11.5 also retries a rate limit up to 15 times on the same model; sandbox sessions writeretry.provider.maxRetries: 2to the agent'ssettings.json, keeping 2026.6.11's two retries behind Gym's model server, which retries upstream failures itself. Session preparation creates that agent directory as the sandbox user, so the upload, which runs as root on Docker, leaves OpenClaw's state writable for a non-root sandbox user.memory.searchfrom 2026.8.1, the first upstream tag with thememorySearch->memory.searchmigration.terminal_bench_2_1/openclawpreset. Two of its 89 task images (qemu-alpine-ssh,qemu-startup) ship glibc 2.31, below the exec tool's 2.33 floor, so the preset pins the release that runs on all 89. The benchmark README points OpenClaw users at the preset;--agent-type openclaw_agentstill runs the adapter's 2026.11.5.onboardthere and that Gym reads only JSONL history. Moving them needs a Node 24 image and a Gym archive that contains this change.Compatibility
output_tokens_details.reasoning_tokensas a per-call sum ornull(previously always0), and host usage comes from the streamed final usage chunk./tmp/nemo-gym-openclaw-node-24.22.3-<version>.context_windowormax_output_tokensis unset: it assumes 128,000 tokens (2026.6.11: 200,000) and requests half the window per call, between 8,192 and 32,768 (2026.6.11: 8,192).openclaw_agent.yaml, AnySWE, SWE-Atlas QA and both training environments set neither, so their per-call output cap rises to 32,768.exectool. Sessions on older images (for example Debian 11, Ubuntu 20.04) are now refused at setup with a 422. In the pinned Terminal-Bench 2.1 set, 87 of the 89 linux/amd64 task images pass;qemu-alpine-sshandqemu-startup(glibc 2.31) are refused, so theterminal_bench_2_1/openclawpreset keeps OpenClaw 2026.6.11; with--agent-type openclaw_agent(2026.11.5) those two tasks end as setup failures rather than scored attempts.commandsuch asnpx openclaw, host responses on 2026.11.5 keep the CLI's final text without the tool calls: npm chooses the package, so Gym has no entrypoint to export the SQLite history with.node <path to openclaw.mjs>and a one-word launcher keep the full transcript.Validation
On
f6a2126b0, all 679 OpenClaw tests, 106 AnyTerminal tests and full pre-commit passed. Real-model Docker rollouts exercised Unicode transcript recovery and the AnyTerminal exec tool on glibc 2.31. Review fixes and rollout resultsLinux x86_64 workstation, Python 3.13.14. The earlier runs below include validation against the then-current
main.1f8fab7005,pytest scripts/harness_conformance/tests/test_openclaw_errors.pywithHARNESS=openclawin apython:3.13-slimcontainer (glibc 2.41, like CI's runner) — 8 passed in 221 s (http-429,http-500,http-503,reset,stream-reset,idle,context-http,context-precheck). Onf1825c20f2CI's job failedhttp-429/500/503and timed out. Each case's failed response reached the Environment Server with its typed outcome; the transport cases made 3 model requests each (two same-model retries).model_request_errorwith 429/500/503,model_transport_error,model_context_limit), with the request counts the probe expected on that release (reset 3, stream cut 1, idle timeout 2): the session settings file does not change it.1951757530,pytest responses_api_agents/openclaw_agent/tests— 672 passed, 4 skipped (the real-CLI tests). The 16 assertions added for the agent directory, the failed-export prefix, the interpreter and package-runner commands and the explicit session id fail on1f8fab7005.1f8fab7005,pytest responses_api_agents/openclaw_agent/tests— 668 passed, 4 skipped (the real-CLI tests; their runtime was not installed this round and the change does not touch the host path). The earlier full run follows.pytest responses_api_agents/openclaw_agent/testsin the adapter's venv withGYM_TEST_OPENCLAW_NODE/GYM_TEST_OPENCLAW_ENTRYPOINTset to the installed Node 24.22.3 and OpenClaw 2026.11.5 and Node onPATH— 635 passed, 0 skipped, including the real CLI's read-tool exchange, forced stop, and the SQLite export in both the sandbox (selected session) and host (all sessions, unrelatedHOME) forms.main'stest_sanitize_repo_git_*tests, which this PR does not touch; they fail on the workstation's Git 2.25.1, which lacksgit init -b.pre-commit runon the files1f8fab7005changes — passed.pre-commit run --all-files— passed with no changes. Onf1825c20f2every hook passed exceptupdate-readme-table, whose cached hook environment on the workstation resolves to Python 3.8; runningscripts/update_env_list.pywith Python 3.13 exits 0 and leavesREADME.mdunchanged.952ff029fb5a32ce54288255a7a7ff536a257a14): cold hostensure_openclaw()andbash install_openclaw_runtime.sh /runtime 2026.11.5in Debian bookworm and Alpine 3.20 reported Node v24.22.3 and OpenClaw 2026.11.5.Rollouts
All real-model runs used
nvidia/nemotron-3.5-super-vl-120b-a12bthrough Gym's OpenAI-compatible model server at temperature 0 with a 4096-token output limit. The stock-verifier, host and image runs used the review fixes (f19d8d7fad,c90e98c57b) on an earliermainmerge, before the glibc check and before #6280 (shared supervisor stop policy) merged; the file task and the Debian buster seed were repeated onbfdbea337a, which includes both. Later commits change only wording.gym env start+gym eval run --no-serve, oneopenclaw_agentexample row, stockmath_with_judgeverifier,single_agent_turn_legacy, Docker sandboxexeccall and result, boxed answer graded correct (reward 1); run health healthy, 1 of 1 rollouts healthy, 0 failures; model calls captured/app/answer.jsonreadandwriteexchanges retained from SQLite; file correct (sum 22510, count 4); cleanup confirmed; close 200; container removedred; close 200redd8bfd5fa27tool_search/dispatch_actionexposed, HTTP 500 from the retained-image check/v1/responses: read a file and sum itreadcall and result retained from SQLite; total 22510; reasoning tokens 138 from per-call counts; workspace removed|
gym eval run --benchmark terminal_bench_2_1/openclaw --sandbox docker --only-tasks regex-log --num-repeats 1onf1825c20f2(Harbor environment server, stock task tests) | session, Docker | OpenClaw 2026.6.11 on Node 24.22.3 in the task container; 14 tool calls (write,exec,process); reward 1; run health healthy, 0 of 15 model responses faulted || Non-root sandbox user (
sandbox_config.user: "1000", workdir/var/tmp), OpenClaw 2026.6.11 preinstalled, "reply ok", on1f8fab7005and on1951757530| session, Docker |1f8fab7005:agents/mainandagents/main/agentowned by root, OpenClaw exits 1 withEACCES … mkdir …/agents/main/sessions.1951757530: both owned by UID 1000, answerok, close 200, container removed || Seed only, Debian buster (glibc 2.28) with the preinstalled 2026.11.5 runtime | session, Docker | HTTP 422: "cannot run its exec tool in this image … needs glibc 2.33 or newer"; no container left |
With tool search off, every session run on both pins exposed exactly
apply_patch, edit, exec, process, read, write. The envelope reported a 128,000-token context budget.The rollout evidence check on the stock-verifier run (
scripts/inspect_harness_conformance.py --require-sandbox) passes TE-1 to TE-5 and TE-7 to TE-9. TE-6 fails because the OpenClaw adapter records no sandbox observation andmath_with_judgereports noevaluation_completed; both are the same onmain.scripts/run_harness_conformance.py --harness openclawon the workstation host reached the model in all 9 scenarios but failed 7 at the firstexeccall: the host has glibc 2.31, so the exec tool's helper does not load. This is the floor the new setup check enforces; 2026.6.11, which has no helper, passed all eight probes registered in October. CI's conformance job runs on newer runners.Terminal-Bench 2.1 image check: each of the 89 pinned linux/amd64 images (package
sha256:7d7bdc1cbedad549fc1140404bd4dc45e5fd0ea7c4186773687d177ad3a0699a) was streamed by manifest digest into a tmpfs root filesystem, without pulling it into Docker, and the installer's exact helper check ran in a chroot with networking disabled, using Node 24.22.3 and@openclaw/proc-safe0.4.2. Node ran in all 89; the helper loaded in 87 (glibc 2.36, 2.39 and 2.41) and was refused inqemu-alpine-sshandqemu-startup(glibc 2.31).A separate local Qwen2.5-0.5B-Instruct generation (earlier round) exercised Gym's training capture route. The saved prompt IDs, generated IDs and generation log probabilities equaled the sampling backend's arrays element for element. This was a single-turn capture check without tools.
These are smoke results. Full benchmark scores (including a Terminal-Bench 2.1 before/after run), GDPVal with MCP grants, multi-turn optimization, and macOS, Windows and ARM runtime execution have not been qualified.
🤖 Generated with Claude Code