Skip to content

[hermes] sandbox stop/start wipes data #7199

Closed as not planned
Closed as not planned

Description

@oparoz

Investigation Summary

No response

Description

From the documentation:

Stop a sandbox’s container to free CPU, memory, and GPU resources without losing anything:
nemohermes <sandbox-name> stop

Unfortunately, if you do this, then the files in the sandbox are reset to a default state. Custom skills are gone, memory is gone, achievements db is gone, session DB is gone, etc.
At least. the config, env and policies are not modified.

Reproduction Steps

  1. nemohermes <sandbox-name> stop
  2. nemohermes <sandbox-name> start

Environment

  • Hardware: GB10 platform
  • OS: Ubuntu 24.04 LTS
  • OpenShell 0.0.72
  • NemoClaw 0.0.88
  • Hermes Agent 2026.7.1

Debug Output

N/A

Logs

$ nemoclaw hermesbox stop
  Hermes Agent gateway is managed by the sandbox; leaving it running while host forwards stop.
  Stopping container 'openshell-hermesbox-1234'…
openshell-hermesbox-1234
  Sandbox 'hermesbox' stopped. Workspace state is preserved.
  Start it again with 'nemoclaw hermesbox start'.

$ nemoclaw hermesbox start
openshell-hermesbox-1234
  Container 'openshell-hermesbox-1234' started.
  Checking gateway health and host forwards…
✓ Active gateway set to 'nemoclaw'
  Probe complete: recovered Hermes Agent gateway in 'hermesbox'.

Checklist

  • I confirmed this bug is reproducible
  • I searched existing issues and this is not a duplicate

Activity

  1. added
    needs: triage
    on Jul 19, 2026
  2. added theissue type on Jul 19, 2026
  3. oparoz commented on Jul 19, 2026

    @oparoz
    Author

    Could be related to #7173

  4. self-assigned this
    on Jul 19, 2026
  5. jason-ma-nv commented on Jul 19, 2026

    @jason-ma-nv
    Collaborator

    Automated triage of this data-loss report. This is a real and serious bug, but the fix is primarily upstream (OpenShell PVC lifecycle) and can't be verified without a real GB10/DGX sandbox with populated workspace data — so I'm unassigning after a full source trace, with a precise handoff. Flagging it as data-loss worth prioritizing + escalating to OpenShell.

    Correction to the likely-cause hypothesis

    start does not recreate the container from the image. nemoclaw <sandbox> start does a plain docker start of the same stopped container (src/lib/actions/sandbox/start.ts:99 → src/lib/onboard/docker-driver-sandbox-recovery.ts:241-252, via: "started-stopped-original" = dockerStart(stoppedOriginal.name)); the paused/backup branches docker unpause/docker rename+docker start. No docker run/image-recreate exists in the start path. That the container name (openshell-hermesbox-1234) is identical across stop/start is consistent with docker start of the same container.

    Where the data actually lives — an OpenShell-owned PVC, not a NemoClaw volume

    The workspace /sandbox (agent skills/, memories/, sessions/, achievements/session state.db) is seeded empty at image build time (agents/hermes/Dockerfile:478-567; no VOLUME declaration). The durable copy lives on a k3s local-path PVC keyed by sandbox name, inside the shared openshell-cluster-nemoclaw Docker volume — documented in src/lib/actions/sandbox/wipe-state.ts:35-52: "the durable PVC retention is owned upstream by OpenShell." NemoClaw never mounts /sandbox (sandbox create passes no workspace -v/--mount; volume topology is entirely OpenShell's).

    Why config/env/policies survive but workspace data doesn't

    Only config/env/policy have an active restore path on start:

    • Config/env are baked into the image and re-seeded/verified on every startup (scripts/nemoclaw-start.sh empty-config baseline; Hermes start.sh config-integrity restore).
    • Network policy / inference route / forwards are re-applied host-side by NemoClaw on start (connect.ts reapply-route/forwards; initial-policy.ts).
    • Workspace user-data has NO equivalent restore — nothing in start.ts/connect.ts/start.sh re-materializes user skills/memories/DBs. So after a direct docker start that comes up without the PVC content, config/policy get rebuilt and look preserved while /sandbox reverts to the empty image default and looks wiped.

    Root-cause boundary (NemoClaw vs OpenShell)

    • Upstream OpenShell (the actual data-loss mechanism): whether the per-sandbox PVC is correctly re-attached when an OpenShell-managed pod container is stopped/started directly via Docker (out from under OpenShell). NemoClaw's stop/start deliberately bypass the OpenShell sandbox lifecycle — a repo-wide search finds only openshell sandbox create/delete/list/exec and forward stop; there is no openshell sandbox stop/start invocation. stop is a direct dockerStop (stop.ts:168); start is a direct dockerStart. If a raw docker start of a k3s pod container doesn't remount the PVC (or k3s reconciles the pod to a fresh spec), /sandbox reverts to the image default — that behavior is OpenShell/k3s, not NemoClaw TS.
    • NemoClaw's fixable parts (TS):
      1. The design decision to drive the container directly (gateDirectDriverLifecycle, stop.ts:56-80) instead of the OpenShell sandbox lifecycle — changing this is a lifecycle-architecture decision and its data-preservation effect is unverified.
      2. The misleading, unconditional "Workspace state is preserved" print at stop.ts:184 — it fires whenever every docker stop returns 0, with no workspace verification, and stop.test.ts:88-97 only asserts the string is printed. At minimum this message should not promise preservation it cannot guarantee.

    Why I'm not landing it unattended

    • The real fix (PVC-on-direct-docker start) is upstream OpenShell, not this repo.
    • Any NemoClaw-side change (switch stop/start to openshell sandbox stop/start, or restore workspace on start, or gate the message) is a data-loss-critical design decision whose correctness can only be confirmed by reproducing on a real GB10/DGX sandbox with populated workspace data and the k3s+PVC topology — not unit-testable on a plain host. A message-only change would make the print honest but would not fix the data loss.

    Recommended: escalate the PVC re-attachment-on-restart behavior to the OpenShell/container-driver owners with this repro; and separately, in NemoClaw, either move stop/start onto the OpenShell sandbox lifecycle or gate the "Workspace state is preserved" message on a verified condition. No existing test covers start-preserves-workspace-data.

  6. removed their assignment
    on Jul 19, 2026
  7. added
    area: sandbox
    integration: hermes
    and removed
    needs: triage
    on Jul 20, 2026
  8. prekshivyas commented on Aug 17, 2026

    @prekshivyas
    Collaborator

    Stale-issue verification — inconclusive

    Reported on: v0.0.88
    Verified on: n/a
    Verification mode: static reproducer review; no execution target leased.

    The run could not establish the complete reported-release baseline and newest-release comparison required for a fixed verdict. The reported-release baseline did not produce a validated symptom match.

    No Project field or label change is proposed. @oparoz — please reply with the missing environment detail or a revised reproducer.

  9. wscurran commented on Nov 18, 2026

    @wscurran
    Contributor

    Hi @oparoz, thanks for reporting the loss of Hermes workspace data after stop/start. We’re planning an updated architecture for NemoClaw, so we’re retiring this earlier lifecycle follow-up as not planned. Direct container control was replaced with OpenShell-owned stop/start in #11909.

    If this is still an issue that needs prioritization, please re-open and tag @wscurran.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: sandboxintegration: hermes

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions