Repository navigation
Description
Description
After a sandbox's Docker container restarts (host reboot, Docker daemon restart, docker restart), the
in-sandbox nemoclaw-start supervisor and the OpenClaw gateway are gone and no CLI path can bring them
back. recover, gateway restart, and connect's auto-recovery all fail with SUPERVISOR_UNAVAILABLE,
and the advice they print is circular: connect says to run gateway restart, which is the command that
just failed. On the sandbox I tested, the last suggestion (rebuild --yes) failed too, in its preflight —
though for a reason that looks specific to snapshot-clones (see Actual Result), so I can't claim rebuild is
broken in general.
The root of the dead end is structural:
- The container's Docker-level workload is only a keepalive (
OPENSHELL_SANDBOX_COMMAND=sleep infinity);
nemoclaw-startruns as an OpenShell session started at onboard time. A container restart kills that
session and nothing respawns it — after the restart the process table contains only PID 1
(openshell-sandbox) andsleep infinity. - Every managed recovery path funnels into
executeGatewaySupervisorAction
(src/lib/actions/sandbox/process-recovery.ts:238), which runs
/usr/local/bin/nemoclaw-gateway-control <action>in the container. That helper delegates to
scripts/managed-gateway-control.py, whose_discover_supervisor(:751) requires a running
nemoclaw-startprocess owned by the sandbox user — and raisesSUPERVISOR_UNAVAILABLEwhen there is
none (:775). So the recovery contract requires the very process the recovery is supposed to restore. - Starting
nemoclaw-startby hand is (correctly) rejected by the security design:
openclaw-config-guard.pyrefusesrevoke-startup-readyoutside "the PID 1 startup transaction"
(scripts/openclaw-config-guard.py:1333), so an ad-hocexec nemoclaw-startdies during startup.
Observed twice: on a v0.0.78-5 onboarded sandbox after a WSL2/Docker daemon restart (the sandbox then
crash-looped policy fetch until the host gateway was brought back — RestartCount reached 4469 — and stayed
gateway-less afterwards), and again today on a snapshot-clone from a fresh main onboard, with a plain
docker restart while the host gateway stayed up throughout.
Environment
Host: Ubuntu 24.04 (WSL2), x86_64
Docker: 29.2.1
OpenShell CLI: 0.0.72
NemoClaw: main @ 9dec1fb89 (onboarded 2026-07-10)
Agent: openclaw, --no-gpu, provider ollama-local
Steps to Reproduce
- Any healthy openclaw sandbox (today's run used a snapshot-clone,
snapshot restore baseline --to clone-test;
the v0.0.78-5 observation was a plain onboarded sandbox) docker restart <sandbox container>(stand-in for a host reboot / Docker daemon restart)- Inside the container:
ps -eo pid,user,args→ only PID 1 andsleep infinity; container health goesunhealthy nemoclaw clone-test gateway restartnemoclaw clone-test recovernemoclaw clone-test connect
Expected Result
At least one managed path (recover being the natural one — "Repair a stopped sandbox gateway") relaunches
the supervisor + gateway after a container restart, or the failure message points at a working remediation.
Actual Result
Step 4:
Restarting OpenClaw gateway in 'clone-test'...
Failure layer: privileged control unavailable - gateway restart failed for 'clone-test'.
SUPERVISOR_UNAVAILABLE
(exit 1)
Step 5:
Probe failed: OpenClaw gateway is not running in 'clone-test' and automatic recovery failed.
Check /tmp/gateway.log inside the sandbox for details.
(exit 1 — and /tmp/gateway.log only contains the pre-restart gateway's log)
Step 6 (auto-recovery inside connect):
SUPERVISOR_UNAVAILABLE
Could not restart OpenClaw gateway automatically.
Retry the managed restart from the host:
nemoclaw 'clone-test' gateway restart
If the sandbox image is incompatible or restart still fails, rebuild it:
nemoclaw 'clone-test' rebuild --yes
The suggested rebuild --yes (exit 1, sandbox untouched):
Rebuild preflight failed: the replacement onboarding host/runtime checks did not pass.
Dashboard port 18790 belongs to sandbox 'my-assistant'.
Sandbox is untouched — no data was lost.
Replacement onboarding preflight failed
Caveat: this sandbox is a snapshot-clone (snapshot restore baseline --to clone-test), and nemoclaw list
shows the clone registered with the source's dashboard port (both list http://127.0.0.1:18790/), which
is presumably what the rebuild preflight collides with. That looks like a separate clone-registry artifact
rather than a generic rebuild failure — I have not run rebuild on a non-clone sandbox. Either way, for this
sandbox every suggested path is a dead end short of destroy + re-onboard.
Notes / possible directions
- Same family as [All Platforms][Onboard] onboard --resume can never recover after the sandbox image build fails: the route reservation it requires is already gone #6563 (
onboard --resumedead end): a recovery path whose precondition is destroyed by
the failure it recovers from. - Possible directions (maintainers' call): have
recoverbootstrap the supervisor session through the same
privileged path onboard uses when_discover_supervisorfinds no candidate (distinguishing "no
supervisor at all" from "supervisor present but wedged", which the currentSUPERVISOR_UNAVAILABLE
collapses); or runnemoclaw-startas the container workload so a container restart restarts it; or at
minimum makeconnect/gateway restartstop suggesting each other and point at the working remediation. - Happy to help validate a fix on this lab (x86_64/WSL2, repro is deterministic).
Activity
mikemason commentedon Jul 11, 2026
I'm just getting started with NemoClaw and ran into this same issue on a fresh Linode:
I used Claude Code to install NemoClaw and get it working, but then after an apt upgrade and a reboot, OpenClaw didn't come back up correctly.
Claude spent quite a while spelunking to try to get things back up, and ended up writing its own restart script to patch around the lack of a supervisor, which I think is fixed by #6677.
One additional nit worth pointing out: when Claude hand-started the gateway, it came up and served the OpenClaw dashboard fine, but every Anthropic API call failed with SELF_SIGNED_CERT_IN_CHAIN. Again, I think #6677 likely fixes this, but there might remain a failure mode where the dashboard is being served but actual LLM calls fail. At the time OpenClaw couldn't reach the model,
nemoclaw statuswas reporting healthy inference, so whatever it's checking is slightly different than what OpenClaw actually uses to hit the model.fix(sandbox): recover relaunches a restart-killed gateway supervisor (#…
fix(sandbox): recover relaunches a restart-killed gateway supervisor (N…
Hokonoken commentedon Jul 13, 2026
Came back to verify #6677 against the original scenario and found a residual gap: the new
relaunch path cannot trigger for any sandbox whose image predates #6677, which is the
population #6635 was about. Full chain below, all steps executed live (Ubuntu 24.04/WSL2 x86_64,
Docker 29.2.1, OpenShell CLI 0.0.72, host CLI built from
main@deed1aaa3, 2026-07-13).The gap
recover's relaunch gate opens only when the in-sandbox controller answers exactlySUPERVISOR_NOT_RUNNING:isExactlyMissingManagedSupervisorrequires stderr to be that single line(
src/lib/actions/sandbox/process-recovery.ts:375), andclassifyGatewayRestartFailuremaps only that marker to thesupervisor not runninglayerthe relaunch requires (
src/lib/actions/sandbox/gateway-restart.ts:131).SUPERVISOR_NOT_RUNNINGis emitted by the post-fix(sandbox): recover relaunches a restart-killed gateway supervisor #6677 controller(
scripts/managed-gateway-control.py:805, the attested stable no-supervisor scan). It doesnot exist in the pre-fix(sandbox): recover relaunches a restart-killed gateway supervisor #6677 controller: the embedded copy in my sandbox (image built 07-10)
has 0 occurrences of
SUPERVISOR_NOT_RUNNINGand 36 ofSUPERVISOR_UNAVAILABLE.src/lib/sandbox/build-context.ts:171) and the host CLI execs the embedded copy(
/usr/local/bin/nemoclaw-gateway-control, argv built inprocess-recovery.tsexecuteGatewaySupervisorActionPinned). I found no code path that refreshes it inside anexisting container — the image build is its only delivery.
So on a pre-#6677 sandbox with a dead supervisor, the controller can only say
SUPERVISOR_UNAVAILABLE— which the CLI treats as retryable-transient and then classifies asprivileged control unavailable. The relaunch never fires.Observed live (post-#6677 host CLI, pre-#6677 sandbox, supervisor killed by container restart)
Process table after
docker stop/docker start: PID 1 +sleep infinityonly — the #6635state. Then:
(That message is
connect.ts:297— the recover flow funnels through the connect probe'srecovery printer.)
docker eventsduring the run shows onlynemoclaw-gateway-control recover <nonce>execs(three in the run where I captured the full retry loop — the documented "at most three
controller attempts"), no
probe, and no container recreate (the container'sCreatedtimestamp is unchanged after every attempt) — the transactional relaunch was never attempted.
Running the embedded controller directly with a valid nonce confirms the answer:
SUPERVISOR_UNAVAILABLE, exit 1.(Two side notes from the same session:
/tmp/gateway.log, which the failure message points at,contains nothing about the recovery — it is frozen at the pre-restart workload's last output.
And injecting the new controller into the old container by hand does not help either: its
file-trust validation answers
SUPERVISOR_REBUILD_REQUIRED, which also maps toprivileged control unavailable. That injection is not a supported path, but it shows the oldimage cannot produce the attestation either way.)
Why this matters
The upgrade population #6635 described — existing sandboxes broken by a host reboot or Docker
restart — cannot benefit from #6677 by upgrading NemoClaw: their embedded controller predates
the attestation vocabulary. And the circular escape is back in a new form: to make
recoverwork the sandbox needs a rebuilt image, but rebuild is the heavier operation
recoverexiststo avoid (and it has its own gates).
Possible directions, whichever fits your intent for #6677:
persisted
OPENSHELL_SANDBOX_COMMANDis the legacy keepalive AND the controller answersSUPERVISOR_UNAVAILABLEstably across the retry loop, proceed to the same attested recreate(the host can perform the double-scan attestation itself via the pinned container id).
managed-gateway-control.pyintothe container (same trusted-uid/mode contract) and re-run the probe, so the attestation
comes from the new code even on old images.
recoversay so:detect the legacy controller (no
SUPERVISOR_NOT_RUNNINGin its vocabulary / legacykeepalive command) and print the rebuild command instead of
Check /tmp/gateway.log, whichcurrently points at a log that contains nothing relevant.
Happy to help with a PR for whichever direction you prefer — I have a live legacy-image sandbox
in this state to test against.