Repository navigation
Description
Description
After nemoclaw {sandbox} rebuild --yes, an OpenClaw sandbox ends up in a contradictory shields state: shields status reports the config UNLOCKED (permissive, "auto-unlock for rebuild"), but the agent skills directory and the credentials directory remain LOCKED. As a result, skill install fails claiming shields are up, and OpenClaw agent turns fail with EACCES on the credentials file. shields down cannot recover the state because it believes the config is already unlocked.
Platform scope: Reproduced on DGX Station GB300 (aarch64). Other platforms not tested.
Regression: Unknown — earlier versions not tested.
Likely the same shields-lock family as #7538 (there: shields down fails from a valid mutable-default posture and rollback flips it to locked). This report is the rebuild trigger and additionally surfaces the skill-install block and the agent-turn EACCES.
Environment
Device: DGX Station GB300
OS: Ubuntu 24.04.4 LTS
Architecture: aarch64
NemoClaw: v0.0.98
Agent: OpenClaw
Steps to Reproduce
- Onboard an OpenClaw sandbox and exercise shields (e.g.
nemoclaw {sandbox} shields upthenshields down). - Rebuild the sandbox:
nemoclaw {sandbox} rebuild --yes. - Check shields:
nemoclaw {sandbox} shields status. - Try to install a skill:
nemoclaw {sandbox} skill install /tmp/some-skill. - Run an agent turn:
nemoclaw {sandbox} exec -- openclaw agent --agent main --json -m "Reply OK". - Try to lower shields:
nemoclaw {sandbox} shields down.
Expected Result
After rebuild with shields reporting unlocked, the agent skills directory and credentials are actually accessible: skill install succeeds and agent turns run normally. If any lock remains, shields down clears it.
Actual Result
Step 3 shields status: "Reason: auto-unlock for rebuild | Policy: permissive" (reports UNLOCKED)
Step 4 skill install: RC=1 -> "Skill uploads write to the agent skills directory, which is locked
while shields are up. If shields are up, run `nemoclaw {sandbox} shields down`
before installing skills."
Step 5 agent turn: "GatewayClientRequestError: Error: EACCES: permission denied, lstat
'/sandbox/.openclaw/credentials/oauth.json'" (reply text becomes
"Agent couldn't generate a response").
An `exec -- ls -ld /sandbox/.openclaw/credentials` also prints
"OpenClaw permission cleanup failed".
Step 6 shields down: "Config is already unlocked for {sandbox} (since ...). Run
`nemoclaw shields up` first, or use --extend (not yet implemented)." -> cannot recover.
So shields status and the actual filesystem lock state disagree: status says unlocked, but skills dir + credentials stay locked; installs and agent turns are broken; shields down refuses because it thinks the config is already unlocked. Only a full re-onboard clears it.
Logs
Not captured beyond the Actual Result output above.
Activity
hunglp6d commentedon Jul 31, 2026
Reproduction notes
TL;DR: The reproduction steps as written (shields up →
rebuild --yes→ observe) do not trigger this on a fast x86 host — the closing rebuild relock succeeds and the host shields state + in-container state-dir posture stay consistent (shields UP). The split only appears when the closing shields relock loses a race to an in-sandbox privileged reconciler that re-permissions/sandbox/.openclaw/.config-hashback to mutable during the relock's re-confirm window. That reconciler runs natively on DGX Station (slower + gateway perm-normalization active); on a fast idle host it doesn't land in the default 750 ms window. Forcing that race reproduces every symptom. This is a cross-platform defect (reproduced on x86) — DGX Station just makes the race natural, it is not an aarch64/Station-specific bug.Environment
1. Issue steps alone — not reproduced (x86)
shields up→rebuild --yesends cleanly; both layers agree:shields status→UP;statonskills/credentialsstays consistent with UP. No split.2. What actually triggers it
The closing relock does a lock → wait (settle window) → re-lock/re-confirm cycle (the #4663 mitigation). It fails only if something reverts the just-locked
.config-hashpermissions during that wait. To force the race deterministically I (a) widened the settle window, and (b) reproduced the in-sandbox reconciler's exact action — reverting.config-hashto660 sandbox:sandbox— during the window. Nothing here hand-places the buggy state; the split is produced entirely by the real relock code failing.Terminal 1:
Terminal 2, started when
Restoring workspace state...prints (simulates the DGX-Station gateway reconciler):3. Reproduced — the relock fails, leaving the split
Rebuild tail (trimmed):
Resulting split state — host state reads UNLOCKED, filesystem stays LOCKED:
shields statussays unlocked, butskills/credentialsremain root-locked →skill installfails, agent turns hitEACCESoncredentials, andshields downrefuses (Config is already unlocked …), so there is no in-band recovery.4. Why the relock can't self-heal
Once the first lock lands,
.openclawis in a locked directory posture, so the re-confirm routes into the guard's verify-only branch — it re-checks the files but never re-applies the lock. A single.config-hashrevert therefore dooms every retry (restart seal requires the exact shields-locked file posture). Meanwhile the recursive state-dir chown (skills→root:sandbox,credentials→root:root) from the first pass is never rolled back, and the host shields state never advances toshieldsDown:false— leaving unlocked-host / locked-filesystem.(Note: on this x86 host the split self-heals when the deferred auto-restore timer fires later, because the injected reconciler has stopped; on DGX Station the reconciler is persistent, so it stays stuck — matching the original report.)
Fixing on it — PR to follow.
fix(shields): re-seal a perms-only config-lock drift on relock (#8086)
hunglp6d commentedon Aug 11, 2026
Resolved in v0.0.103 (and later). This report combined two independent lockdown defects; both are now fixed and released.
1. Config-lock drift split — fixed by #8086, shipped in v0.0.102.
On the rebuild's closing relock, an in-sandbox reconciler could re-permission
.config-hash(permissions only, contents unchanged) after the lock. The config guard's already-locked path treated that as a hardconfig-not-lockedreject, so the relock never re-applied: host shields state was left unlocked while the in-container state directories stayed root-locked, with no clean recovery. The guard now re-seals a permissions-only drift in place instead of failing closed (content or structural drift still fails closed), so the relock converges to a consistent state. This resolves theshields statussplit (step 3), theskill installblock (step 4), and theshields downrefusal (step 6).2. Agent-turn
EACCESoncredentials/oauth.json— fixed by #7603 (closes #7545), shipped in v0.0.103.With shields up, the state-dir guard locked the confidentiality root to
root:root 700, so the gateway's step-down user could not traverse it and the startuplstatof the optional legacyoauth.jsonreturnedEACCESinstead ofENOENT. Lock now sets the confidentiality root toroot:sandbox 710(group traverse, no read), so the file is reported absent rather than access-denied. This resolves the agent-turnEACCES(step 5).Residual scope note: the config re-seal ends the deterministic reject loop and heals a reconciler that reverts once after the lock. A reconciler that reverts continuously can still lose a relock to a narrow settle-window race; that pre-existing race is tracked in #4663 (the re-seal narrows it; a durable immutable flag would close it, but that is unavailable on overlayfs). It is not the defect reported here.
Both fixes are present from v0.0.103 onward (latest v0.0.105). Closing as resolved.