How do I upgrade an AI coding agent's sandbox without losing its workspace and memory files?
Last updated: 4/28/2026
Summary: nemoclaw <n> rebuild handles the full upgrade lifecycle — it backs up workspace state, strips credentials, destroys and recreates the sandbox, restores the workspace, and runs a health check automatically.
Direct Answer: Use nemoclaw <n> rebuild. It performs the following steps automatically:
- Backs up workspace state to ~/.nemoclaw/rebuild-backups/<n>/
- Strips credentials from the backup
- Destroys the old sandbox
- Recreates it with the current image via onboard --resume
- Restores the workspace
- Runs openclaw doctor --fix
You can also use nemoclaw <n> snapshot create to take a manual timestamped backup at any time.
Source: Commands: rebuild and snapshot.