[WSL2][Sandbox] destroy followed by re-onboard leaves POLICY.md behind while other workspace files are correctly wiped
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
## Description
Sandbox `destroy --yes` followed by `onboard --name {sandbox}` (same name) is supposed to permanently delete the sandbox and all workspace files, per the CLI's own destroy confirmation prompt ("This will permanently delete the sandbox and all workspace files inside it"). After re-onboard, `USER.md` and `SOUL.md` are correctly gone, but a `POLICY.md` file survives in the workspace directory — an inconsistent partial wipe, not a full reset.
Platform scope: Reproduced on WSL2 (aarch64) only; other platforms not tested.
## Environment
```text
Device: WSL2 (aarch64)
OS: Linux 6.6.87 (build 2)-microsoft-standard-WSL2
Architecture: aarch64
Node.js: v22.23.2
npm: 10.9.8
Docker: Docker Engine 29.6.2
OpenShell CLI: openshell 0.0.106
NemoClaw: v0.0.118
OpenClaw: unknown
```
## Steps to Reproduce
1. Onboard a sandbox:
```bash
nemoclaw onboard --name {sandbox}
```
2. Write user workspace files, e.g. `USER.md`, `SOUL.md`, and confirm a `POLICY.md` exists in the workspace directory (`/sandbox/.openclaw/workspace/` or the runtime's equivalent workspace root).
3. Destroy the sandbox:
```bash
nemoclaw {sandbox} destroy --yes
```
4. Re-onboard with the same name:
```bash
nemoclaw onboard --name {sandbox}
```
5. Inspect the workspace directory contents.
## Expected Result
The workspace directory is empty or absent after re-onboard — no files from the destroyed sandbox survive, matching the destroy command's own "permanently delete ... all workspace files" contract.
## Actual Result
`USER.md` and `SOUL.md` are correctly gone, but the workspace directory still contains `POLICY.md`.
## Logs
```text
Not captured — only the assertion failure text was retained from the CI run.
```
Contributor guide
Research direction
Start by reproducing the lifecycle with `nemoclaw onboard --name {sandbox}`, `nemoclaw {sandbox} destroy --yes`, and onboarding again on WSL2 aarch64. Trace the destroy cleanup and re-onboard workspace initialization for `/sandbox/.openclaw/workspace/` or its runtime equivalent; done means no `POLICY.md`, `USER.md`, or `SOUL.md` survives the reset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100