Repository navigation
Add RAX: the rax template and Evolver, with a LIBERO example - #134
Draft
iamziyuzhao wants to merge 7 commits into
Draft
iamziyuzhao wants to merge 7 commits into
iamziyuzhao wants to merge 7 commits into
Conversation
…IBERO sessions on Claude Code - hermit/adapter/templates/rax: RAX's skill library (README.md, INDEX.md, skills/<slug>/), checked by RAX's own validate_tree. - hermit/agent/evolver/methods/rax: RAX's exploration session as the acting agent's task functions (actor.py: RAX's start prompt and workspace, its MCP bridge to the frontend on the host, its Claude Code settings and relaunch policy, the library's clone and skill_library_merge), the rax Evolver (RAX's merge of each session's library merges into the adapter; no model), and RAX's library code vendored unchanged (real/rainbow 36c926c) with its license and notice. - examples/libero/rax: LIBERO's forty tasks on RAX's LIBERO-PRO backend (libero-pro/native 1767412): the host service (RAX's operator script, workspace and frontend), the judge (RAX's formal batch), disjoint train, validation and test splits, a smoke and the paper's protocol. - docs/methods/rax.md, the methods index, the LIBERO README, the changelog; tests/methods/rax. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; CPU rendering; tests through the Trainer - A session `prepare` registered and no `collect` ended (the CLI failed before its session, the call was stopped) kept RAX's frontend and simulators until the launch ended. `prepare` now takes a lease (POST /lease), a connection the worker holds; when it closes before /finish, the service ends the session as abandoned. - RAX's bundle sandbox passes bwrap --size, which RHEL 9's bubblewrap 0.6.3 does not take: every rehearsal and formal episode failed at its start (found by the smoke). launch.sh refuses such a bwrap; RAX_BWRAP names a newer one for RAX's processes only (the service and the judge's formal batch find it first on PATH). - RAX_RENDER=cpu: on a host whose GPUs run other processes' CUDA, NVIDIA's EGL broke under the simulators (the smoke's start_episode failed in LIBERO's depth check). The launcher gives RAX's simulators a Python (LIBERO_PRO_PYTHON, which RAX reads) that renders with Mesa's llvmpipe; egl_device.py finds Mesa's software device. - Tests through the Trainer in real bubblewrap: the training session in the task sandbox, its merge taken in by the merge program in the evolver sandbox, the evaluation of the final library; a CLI that fails before its session; the launcher's bwrap check and CPU rendering; the EGL helper on the host's Mesa. An unused import removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…empt a call - The session's run tree (RAX's published/) is the service's now, <state>/run-trees/<random>: the frontend binds it onto the session's published/, and the task sandbox shows the trees read-only (environment.read) in a directory it cannot list, so a session reads its own frames and traces and writes none of them, as RAX's Claude Code sandbox allows. Beside the workspace, the agent could write it. The facts name it (run_tree). - The Stop hook asks the service whether exploration is closed (POST /explored: RAX's launcher's exploration_closed on the session's directory) instead of calling status on the frontend, which a long call can hold; no answer counts as open; at most three relaunches as before. - The configs run each call once (claude.retries: 1): Hermit's second attempt removes the session's workspace and log and calls prepare again, which the service refuses for a session that spent anything. prepare removes nothing an earlier attempt left before the service has accepted the call. The method page says what this loses: a session the provider stops serving is scored 0 (RAX relaunches it on the same conversation). - ADAPTER.md says a bundle sees none of the library (RAX's bundle sandbox on LIBERO; RAX's skill, written for its real robots, lets a controller import library skills). - The merge program runs on this hermit (PYTHONPATH); the library's files leave out Python's caches, as the deployment does; the README runs RAX's setup scripts in RAX's order; cpu_render.sh writes the CPU renderer for launch.sh and for RAX's setup scripts; launch.sh says hermit's overrides go before eval's --adapter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t out, not fatal Round 2 of the post-PR audit (4f3158f): no P1, 1 P2, 8 P3. - The Stop hook is given the run's RAX directory by its path. It found it from the current directory, which follows the agent's cd in Claude Code: after a cd the hook failed and the turn ended with exploration open. A relaunch count it cannot write now ends the turn, not the hook. - The Evolver undoes a merge RAX's merge accepts that leaves no library (INDEX.md deleted, a link straight under skills/), says why, and goes on with the step's other sessions; a git that times out is a reason too. - collect records a library it cannot export, or a session record it cannot read, and the session is still judged. - The export holds back a session's merges whose git objects carry the value of a key the session was given: Hermit's redaction scrubs files, not git's compressed objects. - The merge tool's errors have RAX's public_failure shape. - The service makes the run trees' directory listable again when it stops, so a run can be removed; the README says what to do after a killed one. - The tests pin RAX's LICENSE and NOTICE too (from its main: 36c926c has neither). - Method page: the setup snippet has claude.retries and the run trees; the permission model (bypassPermissions in the task sandbox in place of RAX's acceptEdits, allow list and Claude Code sandbox); a session Hermit's clock ends is judged, RAX resumes its conversations after errors and usage limits; the library's guarantee is the Evolver's and the template's checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ession's git Round 3 of the post-PR audit (ccac84e): no P1, 1 P2, 3 P3. - The Evolver runs the template's whole check (RAX's validate_tree over every skill, library_files) after each merge and undoes a merge it refuses, with the problems. RAX's merge checks only the skills a branch changed as git diff --name-only names them, and git names a rename by its new path alone: a session that renamed a skill another one uses, or moved a skill's only image away, was merged, the next adapter failed the template check, and the Trainer's repair raised IsADirectoryError on the skill directory the check named, which stopped hermit train. - The template check names no file for a skill's or the library's problem (path ""), so repair goes back to the parent's library; a test runs repair. - collect treats a session record that is valid JSON but not an object as unreadable, instead of raising. - collect removes the .git of a session repository (its library repository, its clone; found where prepare makes them) whose objects hold the value of a key the session was given, or cannot be read to tell: the run's directory is kept, and Hermit's redaction cannot reach git's compressed objects. - Method page: Hermit's deployment in the workspace (hermit/rax/, its managed CLAUDE.md block), the rename gap and the Evolver's check, the repository scrub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r restarts and tests Round 4 of the post-PR audit (7293cf7): no P1, no P2; 4 P3 and 5 nits. - The Stop hook's relaunch carries the note RAX's launcher adds to a run's prompt: the episodes that ended uncharged, each told once. The service runs RAX's own report_refunds (services/exploration/pool.py) when the hook would relaunch the session (POST /explored with relaunch). - The session's notes keep no git repository's own directory (.git, or any directory with a HEAD and objects/): the learning material is scrubbed of key values as text, which git's compressed objects are not. - A service started after a killed one stops the frontends that one left all at once, within STOP_SECONDS in all, and launch.sh waits 180 s for it instead of 30 s. - Tests: the restart test stops its second service, and the test directory is removed whole (a run-trees directory without its read bit included), or the test fails. - Nits: the merge tool refuses arguments that are not an object as RAX's frontend does (stage request); the eval configs carry no checkpoint setting; collect exports from where prepare made the repository; a Gemini call counts as spent, so it blocks a second registration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e lease still covers Round 5 of the post-PR audit (1db75f8): no P1, no P2; 2 P3 and 4 nits. - Every git store in the run's directory and the log (a .git, or any directory git takes for one: the session's library repository and clone, a repository of the agent's own, memory/ made a bare one) whose objects hold a key's value loses its objects/ (library.git_stores, library.scrub); collect reads the notes first, and the notes keep nothing of a store, memory/ or code/ itself included. - A workspace whose session spent nothing registers again at most MAX_REGISTRATIONS (3) times in all: the service cannot tell Hermit's retry from the session's own request. The workspace's last open lease closing ends its session, also one the workspace registered since without a lease of its own, and a lease is let go even when its reply fails. The method page and the service no longer say a workspace registers once. - Nits: the Stop hook counts the relaunch before it asks for RAX's refund note, which is told once; a Gemini call RAX counted or still holds a reservation for counts as spent (its usage's calls, as RAX's supervisor tells an old state's spend); a frontend that ends between the check and the signal no longer stops a restarted service; the method page says the working directory names the session's row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Change
RAX ("Scaling Online Exploration for Robot Agents", project, code) lets a coding agent learn a robot task by exploring it. In one session, Claude Code drives the robot through RAX's tools (actions, cameras, depth, a vision-language model). It solves the task by hand, writes a controller, rehearses the controller unattended and submits it. The submitted controller is then evaluated alone, without the agent, on held-out scenes. Across sessions RAX keeps a skill library (§3.4). The library is a git repository of executable skills with their evidence. A session merges into it only through a harness tool that checks each skill's format and evidence.
Hermit could not run it. This PR adds RAX as a method. RAX's own code runs every session, unchanged, at the pinned commits:
libero-pro/native1767412 for LIBERO: the operator script, workspace, frontend, supervisor, simulators and formal batch, from RAX's checkout.real/rainbow36c926c for the skill library, whichlibero-pro/nativelacks:services/skill_library.pyand thecontinual-learningagent skill, vendored with RAX's license and notice.The acting agent is RAX's session on Hermit's Claude Code agent. The adapter is RAX's skill library, and the Evolver is RAX's merge. No learner model is involved: the agents write the library, and RAX's code checks and merges it.
What it adds
raxhermit/adapter/templates/rax/: RAX's empty library (README.mdfor this robot,INDEX.md;skills/is learnable),ADAPTER.md(what a session reads of it),exports.yaml,.hermit/adapter.yaml,.hermit/check.py(RAX'svalidate_treeover every skill),.hermit/EVOLVER.mdhermit/agent/evolver/methods/rax/actor.py(RAX's session as the CLI agent's task functionsprompt,prepare,answer,collect),library.py(the library on both sides of a step),library_server.py(RAX'sskill_library_mergeas an MCP server),stop_hook.py(RAX's relaunch policy)raxevolver.py(aCommandEvolver),merge.py(the program it runs in the evolver sandbox),evolver.yamlupstream/skill_library.py,upstream/continual-learning.SKILL.md,upstream/LICENSE,upstream/NOTICE(unchanged; the tests pin their hashes;LICENSEandNOTICEare from RAX'smain, since 36c926c has neither)examples/libero/rax/:run.yaml,eval_val.yaml,eval_official.yaml,smoke.yaml,rows.py,service.py,judge.py,formal.py,launch.sh,cpu_render.sh,egl_device.py,task-info/, READMEdocs/methods/rax.md; rows indocs/methods/index.md,docs/index.mdandexamples/libero/README.md; CHANGELOGtests/methods/rax/test_rax.py(44); theraxgroup intests/selection.pyandtests/README.mdNo core change. Outside the method's three places, the PR changes only:
examples/libero/.gitignore;tests/core/test_selection.py. A change to the robotics engine's or LIBERO's shared files now also selects theraxgroup, becauseraxhas an example underexamples/libero/.RAX is a checkout beside Hermit, as ASPIRE's is, not a
pyproject.tomldependency group. It needs its own environments: a host Python and LIBERO-PRO's Python 3.8 simulator environment. It also needs LIBERO-PRO's checkout and data, and a GPU.launch.shnames the pinned commit.How Hermit runs a RAX session
The host service (
examples/libero/rax/service.py, on RAX's host Python) is RAX's trusted side. The task sandbox has no GPU and must not see RAX's session directories, so this side runs here. For each rollout:scripts/configure_auto_research.py) makes the session's configuration from the task row.prepare_workspacemakes the session's workspace.published/is the session's run tree: a directory of the service's (rax-service/run-trees/<random>). The task sandbox shows the trees read-only, in a directory it cannot list, so a session reads its own frames and traces and writes none of them, as RAX's Claude Code sandbox allows.The service trusts a session only with its workspace and task id:
claude.retries: 1) from the session's own request, which can only replace the session with a fresh one of the same row: the same layouts, seeds and budget.POST /explored), by RAX's launcher's own rule (exploration_closed) on the session's directory.The session runs in the task sandbox (
actor.py).prepareregisters with the service, and removes nothing an earlier attempt left before the service has accepted it. It writes RAX's workspace beside the deployment, linksruntime/autonomous_controllerto the session's run tree, and links/tmp/rax(in the sandbox's own tmpfs) to the rollout's socket directory. It then wires Claude Code as RAX's Claude Code launcher does:CLAUDE.mdreadsAGENTS.md, and.claude/skillsis.agents/skills.auto_research(.rax-mcp.json, with--strict-mcp-config).stop_hook.py). The hook asks the service whether exploration is closed rather than RAX's frontend, which a long call can hold, and a service that does not answer counts as open. It is given the rollout'sraxdirectory by its path: Claude Code runs a hook in the shell's current directory, which follows the agent'scd.With an adapter,
preparebuilds the session's library repository from the adapter's files and clones it with RAX'scheckout. It also servesskill_library_merge, which is RAX'smergeagainst that repository. The prompt is RAX'sSTART_PROMPT.mdin code mode.Last,
preparetakes the session's lease (POST /lease): a connection to the service that the worker holds while the session runs. If the worker ends withoutcollect(the CLI failed before its session, or the call was stopped), the connection closes with everything in the task sandbox, and the service ends the session asabandoned. It ends the workspace's session when the workspace's last open lease closes, so this also holds for a session the workspace registered since without a lease of its own. Without the lease, such a session kept RAX's frontend and its simulators until the launch ended.collectends the session at the service and lets the lease go. It writes these into the log:HOME,<call>/home, outside the run's<call>/workspaces/<run>) is not scanned (round 6, open);pipeline_extra.task;memory/orcode/itself included).The judge (
judge.pyandformal.py) runs on the host. It runs RAX's formal batch of the submitted bundle (the supervisor'srun_submission) on the row's formal layouts, with RAX's Python. The score is the share of successful episodes, by LIBERO's own check; errors count as failures. The feedback names only the count and the layouts.The step
flowchart TD A[the adapter: the library] -->|deployed; prepare builds the session's repository and clone| S[RAX session in the task sandbox: Claude Code with RAX's frontend tools on the host] S -->|skill_library_merge: RAX's merge into its repository| R[the session's repository] S -->|submit| J[judge on the host: RAX's formal batch of the bundle on the row's held-out states] R -->|collect: a bundle of main past the base| M[the step's learning material: library.json and library.bundle in the run's log] M --> E[rax Evolver: a fresh repository of the adapter, the same base commit] E -->|RAX's merge of each session's bundle, every changed skill checked again| E2[merged main] E2 -->|INDEX.md and skills/ written back| L[the next adapter] L --> K{template check: RAX's validate_tree}The Evolver reads each session's
library.jsonandlibrary.bundlefrom the step's learning material. It builds a repository of the adapter, whose first commit is the commit the session started from (fixed identity, date and file mode). It then fetches each bundle ontosession/<name>and runs RAX's merge, which checks every changed skill again. The mergedINDEX.mdandskills/become the next adapter.The Evolver leaves a session out, and says why in the step's result, when any of these holds:
library.jsonsays which);INDEX.mdgone, a link straight underskills/, a skill another one uses renamed, a skill's only image moved away. RAX's merge checks only the skills a branch changed, asgit diff --name-onlynames them (a rename appears by its new path alone), and takes such a merge in; the Evolver checks every skill, undoes the merge with the problems, and goes on with the step's other sessions.The final adapter is the library after the last session. The configs run one session a step (
step_size: 1), as RAX does.Data splits (
examples/libero/rax/rows.py; task directories in Harbor's format; no row is in two splits)env.seed(1000 + i), then a reset)train-<task>, 40run.yaml(hermit train)val-<task>, 40eval_val.yamltest-<task>, 40run.yaml(hermit eval)official-<task>, 40eval_official.yamllibero_spatial_0smoke.yaml(train; eval)The tasks are LIBERO's Spatial, Object, Goal and Long suites, 40 in all. A row is one session in code mode with 20 exploration episodes, the paper's budget (Appendix C.7); the smoke rows have 2.
What the splits share:
officialexplores test's layouts and is scored on the states train and val are scored on. It is the paper's protocol for RAX as published (--adapter none), not a held-out estimate for a learned library.TASK.mdsays, for every LIBERO-PRO session, that formal layouts may swap objects.Protocol: train / test. The Evolver learns across the 40 training sessions, one a step, in LIBERO's order. A checkpoint is saved every 10 steps (
ckpt-step-10,-20,-30), andeval_val.yamlcompares them. The chosen or final library is evaluated frozen on test. The baselines are--adapter root(the empty library) and--adapter none(RAX as published).In
hermit eval, each session merges into its own repository only, and no Evolver step runs, so test sessions do not learn from each other. RAX has no validation step of its own, so the Evolver is given no validation split.The authors' implementation against this one (the same table, with the reasons, is in
docs/methods/rax.md)draft), again when verified, and before the session ends; later sessions start from the merged librarySKILL.md, code and evidence in a git repository, one per robotINDEX.mdandskills/; each session's repository is built from the adaptermerge: format and evidence checks, then a merge into main; a conflict goes back to the agentstep_size: 1, where no such conflict can occur--strict-mcp-config);acceptEditswith an allow list (its MCP server, reads of its readable paths); web tools denied; the subagent tools denied when the cap is 0; edits of.claude/and.mcp.jsondenied; commands in Claude Code's own sandbox, allowed without asking (writes in the workspace and the socket's directory, no network).rax-mcp.jsonis guarded too), on Hermit's Claude Code agent. ItsbypassPermissionstakes the place of RAX'sacceptEdits, allow list and Claude Code sandbox: the CLI and all it runs are in the task sandbox (bubblewrap), which shows only declared paths, lets it write only its run's directory and its own/tmp, and reaches only the model provider's hosts and the service's port.claude/, and what it writes runs in the same sandboxSTART_PROMPT.md;prepare_workspacecontinual-learningskill and the two library paragraphs ofreal/rainbow'sAGENTS.md(ADAPTER.md; the method page marks the adaptations), and Hermit's deployment: the adapter's copyhermit/rax/, and Hermit's managed block inCLAUDE.mdafter@AGENTS.md(its note that the adapter's paths are relative tohermit/rax/, whichADAPTER.mdoverrides for its own;ADAPTER.mdunder a###heading)libero-pro/nativehas no library; acceptable--resume,CONTINUE_PROMPT) while exploration is open, at most 3 times; a run's prompt gets the launcher's note of the episodes that ended uncharged (report_refunds, each told once)report_refundswhen the hook relaunches); exploration is closed by the launcher's own rule (exploration_closed), which the service appliesERROR_PROMPT, up to 5 in a row); after the login's usage limit, it waits for the reset and resumes it (USAGE_PROMPT, up to 10 times)plan_rerun). That is a new conversation from RAX's start prompt, not RAX's resumed one: RAX's session, its budget and the agent's notes (memory/PROGRESS.md, which RAX's prompts send it back to) are as they were; the conversation's context is not. A session the CLI reports as failed (an error result, a crash) is scored 0 without its bundle judged, and its merges are taken in. One Hermit's clock ends is judged as any other. One the provider stops serving past Claude Code's own retries fails the call beforecollect: scored 0, its merges left out. Hermit's own second attempt of a call is off (claude.retries: 1): it would remove the session's workspace and log and start the session again, which RAX never doeshermit/trainer/rollout.pyjudges no failed session; one CLI per call, no resumed conversation); a recorded deviation. Judging a failed session that submitted would be a core changeADAPTER.mdsays to copy into the bundle what it uses of a library skill (RAX's skill, written for its real robots, lets a controller import them)real/rainbow's, whose controllers run in the agent's workspace; acceptableeval_official.yamlfor the paper's tableRAX_KEY_FILEis given; no cap at the pinned commit; each session's spend is recorded (gemini_usd)--adapter noneis the paper's settingclaude.timeout_s)RAX_RENDER=cpu, Mesa's llvmpipe through RAX's ownLIBERO_PRO_PYTHON(physics unchanged, images differ by renderer noise)Application-side changes (
examples/libero/rax/, task-side code):rows.pywrites the rows and splits.service.pyis RAX's trusted side on the host (above).judge.pyandformal.pyare the score: RAX's formal batch on the session's formal layouts.launch.shchecks RAX's host Python and names a commit other than the pinned one. It refuses abwrapthat takes no--size: RAX's bundle sandbox passes--size, and RHEL 9's bubblewrap 0.6.3 does not take it, so every rehearsal and formal episode would fail at its start.RAX_BWRAPnames a newer bwrap for RAX's processes only (the service and the judge's formal batch find it first onPATH); hermit's own sandboxes keep the system's.RAX_RENDER=cpugives RAX's simulators a Python (LIBERO_PRO_PYTHON, which RAX reads) that renders with Mesa's llvmpipe: other processes' CUDA on a GPU can break NVIDIA's EGL, and the smoke'sstart_episodefailed in LIBERO's depth check that way on this machine. The launcher then writes the rows, starts the service (which answers/healthwith this launch's nonce), runshermit trainorhermit eval, and stops the service.cpu_render.shwrites that Python, for the launcher and for RAX's own setup scripts (the README's setup withRAX_RENDER=cpu).task-info/says what a row and its record are.Left out:
First evaluation (reproduction guide §4): pending. RAX's agent is Claude Code, and the Evolver calls no model. The first evaluation therefore runs the smoke (
smoke.yaml, Claude Haiku 5.5), then a reduced run of the protocol with the paper's agent settings. The reduced run evaluates the final library on test against--adapter rootand--adapter none, with paired differences and standard errors.Validation
All on Linux (RHEL 9, bubblewrap), Python 3.12:
python -m pytest tests/methods/raxat 32ccaaf: 44 passed (46 s; up to about 105 s on this shared machine under load), leaving no test directory behind.hermit.agent.acting.workspace:run), the real Evolver step and the judge. It uses a scripted Claude Code (args, prompt, settings, a skill committed and merged through.rax-mcp.json) and the real service over HTTP, with RAX's configure, workspace and frontend calls replaced.Trainer.train, thenhermit.evaluate.evaluateof the final library) in real bubblewrap. The training session runs in the task sandbox, the merge program in the evolver sandbox, and the judge on the host; every launch record must be enforced with its probe passed. In the task sandbox the session reads its run tree, its write there fails (EROFS), and listing the trees' directory fails (EACCES). The second test's CLI fails before its session, and its session is ended by the lease.prepareinstalls it, against the service, from the workspace, a subdirectory and a directory outside it: three relaunches while exploration is open, the first with RAX's note of an episode that ended uncharged, none once RAX's marker or a submission closes it. A robot socket that takes the call and never answers is not waited on, and a service that does not answer counts as open. A relaunch count it cannot write ends the turn rather than relaunching without a bound.prepareremoves anything (test_a_call_run_again_on_a_session_that_spent_something_is_refused_and_removes_nothing).python -m pytest --changed(every group: a template'sadapter.yamlis new), in a fresh venv with.[test,mini-swe-agent]and the CI's dependency groups, on the third commit's tree (before its last edit, which movedprepare's cleanup into itstry; theraxtests pass after it): 2042 passed, 121 skipped, 5 failed (41 min). On the first commit's tree: 2034 passed, 121 skipped, the same 5 failed. The 5 fail identically onmain899597b in the same venv, so they are not this PR's:examples/clbench_database/utils/tests/test_parity_golden.py;tests/core/test_sandbox.py::test_a_linked_venv_runs_by_its_own_name_with_its_own_packages;tests/core/test_sandbox.py::test_the_command_line_runs_a_command_with_a_socket_forwarded_and_a_path_hidden:AF_UNIX path too longunder that run's longTMPDIR. It passes withTMPDIR=/tmp, here and onmain.--changedrun on 32ccaaf (.github/workflows/tests.yml): passed (13 min). On 1db75f8: passed, 2040 passed and 133 skipped (14 min); on 7293cf7 and ccac84e: passed.tests/core, in another environment) failed 9 tests. Two were this change, both fixed:test_packaging.py(the template'sskills/.gitkeepis not package data, sobuildnow adds RAX'sskills/.gitkeep) andtest_selection.py(the two expected sets above). The other 7 fail identically onmain899597b in that environment.sphinx -W) at 32ccaaf: passed.hermit check --no-probeon all four configs at 32ccaaf, with RAX's real checkout, a state directory with the service'srun-trees/and a placeholder token: passed (sandbox — enabled=True, enforce=required, agent: the task sandbox (bubblewrap), network=no-network, judge=host). WithoutCLAUDE_CODE_OAUTH_TOKEN, the login item says to runclaude setup-token.bootstrap_sources.sh,setup_host_env.sh,setup_libero_pro_env.sh,setup_libero_pro_data.py, andsetup_libero_pro_demos.pyforlibero_spatial_0.libero_pro_doctor.pythen passed onlibero_spatial_0: collections 0 and 1, and the simulator checks. It passed again with the simulators on Mesa's llvmpipe (RAX_RENDER=cpu's Python).Smokes on the real RAX (
smoke.yaml, Claude Haiku 5.5 on the machine's Claude login, one training session):enforced, network isolated with onlyapi.anthropic.comallowed, the service's ports forwarded, and its probe passed.bwrap: Unknown option --size. That led to the launcher's bwrap check andRAX_BWRAP.start_episodefailed in LIBERO's depth check. Other processes' CUDA shares every GPU of this machine, and NVIDIA's EGL breaks under it. That led toRAX_RENDER=cpu.evaluateandfinishall worked. It then kept its last episode and ended without a bundle (the model's choice). The judge scored 0/2, and the Evolver made no change.RAX_RENDER=cpu, bubblewrap 0.9.0): a scripted CLI in the task sandbox drove RAX's frontend through RAX's own bridge (.rax-mcp.json), with a do-nothingcontroller.py. Everything else was real: the service, RAX's frontend, simulators, bundle sandbox and formal batch, the judge, the merge tool, the Evolver andhermit eval.smoke):register;rehearseran clean in 9.5 s (reason: exit,returncode: 0,task_complete: false);skill_library_mergemerged a skill;submit.completed, 2 episodes, 0 errors, 0 successes, so the score was 0.0.enforced, network isolated with onlyapi.anthropic.comallowed, probe passed; the Evolver's isenforced, network isolated, probe passed.hermit eval --adapter final(smoke_test): the session's clone held the trained skill, and it merged nothing. It rehearsed on its own layout 302 and submitted. Its formal batch on LIBERO-Pro swap states 0-1 completed with 2 episodes and 0 errors.mean_score0.0,errors0.agent.model.*overrides ofsmoke.yaml), at d8ff7fe withRAX_RENDER=cpu: 1,103 s, 7.6M tokens. The session used every lever:task_complete: true.skill_library_merge:pick-bowl-rim-place-on-plate, with itsSKILL.md, code and evidence. Then it submitted.hermit eval --adapter final(smoke_test, the same agent): 1,675 s, 5.5M tokens. The session readskill-library/INDEX.mdand the trained skill'sSKILL.md, code and evidence, and reused the skill: it copied the skill's modules into its own controller and improved them (a multi-level surface detection, a fallback for the plate's height). It rehearsed on layout 303 (clean,task_complete: true) and submitted. It then merged the improved skill back (v3, with this session's evidence). The formal batch on LIBERO-Pro swap states 0-1: 2/2,mean_score1.0.episode_reviews,runs; the rehearsal's run with 8 frames after it); a write into it fails withEROFS; listing the trees' directory fails withEACCES.exploration_closedthroughPOST /explored).run_tree). The Evolver took in 1 of 1 sessions' merges.hermit eval --adapter final: the clone held the trained skill; the same run-tree and Stop hook results; the formal batch completed with 0 errors.code/noop, as Claude Code runs it after the agent'scd:EROFS, listing the trees' directory fails withEACCES. Once the service stopped, the trees' directory was listable again (mode 700).hermit eval --adapter final: the clone held the trained skill; the same Stop hook and run-tree results;errors0.relaunch, which ran RAX's ownreport_refundson the session's exploration (no episode had ended uncharged, so no note). The hook blocked fromcode/noopwhile exploration was open and not after the submission, with nothing on its stderr. The run tree:EROFS,EACCES; listable again after the service stopped. The formal batch: 2 episodes, 0 errors. The Evolver took in 1 of 1 sessions' merges.code/noop; after the submission it did not, with nothing on its stderr either time.collectscanned the run's two git stores in the real task sandbox: no key in them, nothing removed, no scan error. The ledger: the session finished, notabandoned. The run tree:EROFS,EACCE 8000 S; listable again after the service stopped. The formal batch: 2 episodes, 0 errors. The Evolver took in 1 of 1 sessions' merges.Not verified yet:
Review
docs/methods/rax.mdcovers setup, the template, the session, the step, parameters (aliteralincludeofevolver.yaml), the authors-vs-port table, boundaries and the example.examples/libero/rax/README.mdcovers RAX's setup, the splits, the commands and the outputs.test_the_configs_run_raxs_session_on_claude_code_in_the_task_sandbox_with_their_splitsloads each withConfig.loadand checks its splits, agent, sandbox and judge. The README, method page andlaunch.shname the same variables and commands.claude-codethroughagent.base: claude; Layer 3, the CLI agent with RAX's task functions). Its model calls are Claude Code's, on the Claude login with Hermit's plan, timeout and usage. The Evolver is aCommandEvolverrunningmerge.py, with no model. RAX's Gemini calls are RAX's frontend's own, on the host: they are outside Hermit's model layer, and each session's cost is in its facts (gemini_usd).--key-file); the sandbox never sees it. The Claude token is the login's. The diff was scanned for keys and local paths.General checklist
preparerefuses a backend other than Claude Code, and a/tmp/raxthat is not this sandbox's link. If wiring fails after registration, the session is ended at once (test_prepare_refuses_another_agent_a_foreign_socket_directory_and_ends_a_session_it_cannot_wire).collectcannot reach the service, the facts keepfinish_error, and the judge ends the session. A library it cannot export, or a session record it cannot read, is recorded in the facts and inlibrary.json, and the session is still judged (test_collect_keeps_the_session_when_the_service_cannot_end_it).test_the_export_holds_back_merges_that_carry_a_key_the_session_was_given). Every git store of the run whose objects hold one loses them: the clone, a repository of the agent's own,memory/made a bare one, and one in the log. A session record that is not an object is recorded as unreadable (test_collect_*).test_a_workspace_registers_at_most_max_registrations_times).prepareremoves nothing before the service accepts (test_a_call_run_again_*). The workspace's last open lease closing ends its session, also one registered since without a lease (test_a_session_whose_process_ends_without_collect_*). A second service on the same state is refused, and a restarted one stops the frontends the last left, all at once, and ends their sessions (test_the_service_*,test_a_service_started_again_*).test_the_stop_hook_*).test_the_judge_*).test_the_evolver_undoes_*). The template check names no file for a skill's or the library's problem, so the Trainer'srepairgoes back to the parent's library and never trips over a skill's directory (test_the_check_runs_raxs_checks_on_every_skill_and_refuses_linksrunsrepair). It reads no log outside the step (test_the_evolver_*).loader.instantiate,StepContext) and the judge. The stand-ins sit at the edge: a scriptedclaude, RAX's configure/workspace/frontend calls and a stand-in robot socket. The configs load throughConfig.load. Real-RAX runs: above (smokes 1-9).prepareremoves nothing before the service accepts); the Stop hook asked a frontend that a long call can hold (now the service, by RAX's rule); RAX's skill lets a controller import library skills that a bundle cannot see (now said inADAPTER.md). P3: the merge program'sPYTHONPATH, Python caches in the library's file list, and the README's setup order.cdit failed and the turn ended with exploration open (now given its directory by path). P3: the Evolver's merge program crashed on a merge RAX's merge accepts but that leaves no library (now undone, and the step goes on);collectraised when the library could not be exported (now recorded); a key's value in a session's merges was out of the redaction's reach (now not exported); the method page's permission model, "checked twice" and usage-limit claims; this description's stale lines; the method page's setup snippet; the run trees' directory left unremovable after the service (now listable once it stops). Nits: the merge tool's errors now have RAX's shape, and a config comment's unit.git diff --name-onlynames a rename by its new path alone), the next adapter then failed the template check, and the template check named a skill's directory, on which the Trainer'srepairraisedIsADirectoryErrorand stoppedhermit train(now the Evolver runs the template's whole check after each merge and undoes a merge it refuses, and the template check names no file for a skill's problem). P3:collectraised on a session record that is valid JSON but not an object; a key's value committed in the session's repositories stayed in the kept run directory (now their.gitis removed); the method page and this description left out Hermit's deployment (hermit/rax/, its managedCLAUDE.mdblock).code/**/.git), whose compressed objects redaction cannot scrub (now no git store is kept); a test left its second service's run trees unlistable, so its directory stayed (now that service is stopped, and the test directories are removed whole, or the test fails); the relaunch prompt lacked RAX's note of the episodes that ended uncharged (now the service runs RAX'sreport_refundswhen the hook relaunches);launch.shwaited 30 s for a service that first stops what a killed one left, up to 120 s a frontend (now it stops them all at once, andlaunch.shwaits 180 s). Nits: the merge tool's refusal of arguments that are not an object is RAX's; the eval configs carry no checkpoint setting;collectexports from wherepreparemade the repository; a Gemini call counts as spent; this description's test timings.memory/made a bare repository it reached the learning material (now every git store of the run and the log is checked, and the notes keep nothing of a store). A session could make the service register its workspace again, any number of times while it had spent nothing, and the newest session was not covered by the worker's lease (now three registrations at most, the workspace's last lease ends whichever session it has, and the texts no longer say a workspace registers once). Nits: the Stop hook asked for RAX's refund note (told once) before it knew it could count the relaunch; a Gemini call in flight, or one whose bill RAX could not read, did not count as spent; a frontend that ended between the check and the signal stopped a restarted service; the method page did not say the working directory names the session's row.spent()against RAX's supervisor; the Stop hook's two requests). Open, offered to the maintainers rather than fixed:HOME(<call>/home, outside the run's directory) or under a directory it left unlistable keeps a key's value in the keptactor-logs/tree. The learning material is not affected. A fix: scan the call's directory, and open an unlistable directory as Hermit'sredact_treedoes.OSErrorand git's errors. A multi-GB object in a session's store could raiseMemoryErrorincollect, so the call fails, unjudged, and its merges are lost (plausible, not run). A fix: read objects in chunks ashermit/redact.pydoes, and record any error ingit_scan_error./registerand taking the lease leaves its session open until the service stops (one idle frontend; RAX starts its backend lazily), so "ended when the worker's lease closes" holds once the lease is taken; after a session registers itself again,hook.jsonnames its first session, so the hook counts exploration as open for its three relaunches.Method reproduction checklist
raxtemplate, because no existing template holds a repository of skills that sessions merge into through a checked merge.INDEX.mdandskills/**. Fixed: the rest.ADAPTER.mdin its context, and through the task functions the library's clone, RAX'scontinual-learningskill and theskill_library_mergetool.raxEvolver; the flow chart is above.START_PROMPT.md,prepare_workspace's files, thecontinual-learningskill and the merge tool's name, description and schema.ADAPTER.mdis RAX'sAGENTS.mdparagraphs, with the adaptations marked on the method page.task-info/is informational; with no learner model, nothing reads it to learn.sandbox: {enabled: true, enforce: required}, andweb_search: false.environment.read; the trees' directory cannot be listed). It forwardsRAX_SERVICE_URL's loopback port and runs withnetwork_mode: no-network.hermit checkreportsagent: the task sandbox (bubblewrap), network=no-network, judge=host.holds_key), the notes keep nothing of a git store, and every git store of the run and the log whose objects hold one loses them (git_stores,scrub). A store elsewhere in the call's writable directory (the session'sHOME) is not scanned (round 6, open), and, as for every method, a file the agent compresses itself is out of the redaction's reach too.enforced, network isolated with onlyapi.anthropic.comallowed, the service's ports forwarded, and its probe passed. In smokes 6 to 9 the real task sandbox refused the session's write into its run tree (EROFS) and its listing of the trees (EACCES).claude.argsandclaude.env;.claude/settings.json, written byprepare;web_search: false.Test checklist
tests/methods/rax/. Theraxgroup covershermit/agent/evolver/methods/rax/*,hermit/adapter/templates/rax/*,examples/*/rax/*anddocs/methods/rax.md, and the robotics engine's paths select it too. It is listed intests/README.md.test_a_service_started_again_ends_what_the_last_one_left_open_and_two_never_share_a_state).services.mcp_contractand configure/workspace/frontend calls.test_packaging.pyin the core run above, on the template's.gitkeep, and the lease test without the lease. The other tests were written with the behavior they hold.Config.load, the Trainer (Trainer.train,hermit.evaluate.evaluate), the CLI pipeline, the Evolver through the loader, the judge, the service over HTTP,launch.sh. Stand-ins sit only at the CLI, RAX's checkout and the robot.~/.cache/hermit-tests/rax-*, each in a directory of its own that is removed after it, a run-trees directory without its read bit included; a test fails if its directory is left (KEEP_TEST_DIRSkeeps it). The Trainer test'shermit.evaluate.evaluateleaves a/tmp/ha-eval-*directory, which ismain's own (hermit/evaluate.pynever removes it). They use no sign-in and no network beyond loopback.sleep 120processes, killed in itsfinally.Sandbox checklist
Reuse the framework's sandbox. The session runs in the task sandbox (bubblewrap,
enforce: required). The Evolver'smerge.pyruns in the evolver sandbox. Two parts run on the host, by design:published/is the run tree in the service's directory, and each bundle episode runs in RAX's own fresh bubblewrap sandbox.judge.mode: host) reads the ledger and runs RAX's formal batch.A real session's launch record is above (smoke 1).
Sandbox changes are core changes. None.
Benchmark checklist
hermit.task.directory.write_taskand read back byrows.py:task_row(data.view).test_the_rows_are_written_as_task_directories_and_read_back_wholechecks it.TASK.mdsays (formal layouts may swap objects). The feedback states successes over episodes.network_mode = "no-network", with the service's loopback port forwarded. No memory limit is declared. The effective timeouts are:claude.timeout_s(48 h; 3 h for the smoke);trainer.call_timeout_min, which bounds only the Evolver's merge.hermit trainwith Claude Haiku 5.5; the paper's agent throughhermit trainandhermit eval(1.0 on both smoke rows, the eval session reusing the trained skill); and two model-free runs ofhermit trainthenhermit evalthrough a submission, its formal batch, a merge and the Evolver's step.