Repository navigation
Description
Summary
During the OpenClaw 2026.5.19 update/backup procedure started around 2026-05-21 11:30 JST, the local user workspace directory was removed:
~/.openclaw/workspace
This directory contained active user-owned operational data and local customizations, including:
- memory files
- workspace scripts
- local skills
- local plugins
- a configured plugin path referenced by
~/.openclaw/openclaw.json
The workspace was restored manually from Time Machine. After that, the Gateway became usable again, but the system was left with plugin/npm registry inconsistencies.
This should be treated as a data-loss class bug. The update/backup/rollback flow should never delete ~/.openclaw/workspace.
Environment
- OS: macOS 26.5 arm64
- Node: 25.8.1
- OpenClaw channel: stable
- Version before/after manual rollback:
OpenClaw 2026.5.12 (f066dd2) - Update target shown as available:
2026.5.19 - Gateway: LaunchAgent, port
18789 - Config path:
~/.openclaw/openclaw.json - Workspace path:
~/.openclaw/workspace - Managed npm plugin path:
~/.openclaw/npm/node_modules
Timeline
- Around 2026-05-21 11:30 JST: started the 2026.5.19 update/backup flow.
- After the update/backup process,
~/.openclaw/workspacewas missing. - Because the config referenced a local plugin under
~/.openclaw/workspace/plugins/..., Gateway config validation failed. - The workspace was manually restored from Time Machine.
- After restoration and rollback to 2026.5.12, Gateway and Nextcloud Talk became usable again.
- Remaining inconsistency:
openclaw doctorstill reports missing managed npm host peer links.
Expected behavior
The update/backup/rollback flow must not remove the active user workspace.
Expected safeguards:
- Never delete
~/.openclaw/workspaceduring update, backup, restore, rollback, cleanup, or uninstall-adjacent flows unless the user explicitly confirms deletion. - If any code path might affect workspace data, create a full backup first.
- Validate configured
plugins.load.pathsbefore and after update. - Abort safely if a configured local plugin path would become missing.
- Keep managed npm plugin install records, installed package versions, and peer links consistent after update/rollback.
- If peer links are broken,
doctoror update logic should repair them deterministically.
Actual behavior
The workspace disappeared and Gateway startup/config validation failed because a configured plugin path no longer existed.
Observed error:
Invalid config at /Users/shoichi/.openclaw/openclaw.json:
- plugins.load.paths: plugin: plugin path not found:
/Users/shoichi/.openclaw/workspace/plugins/ai03-nextcloud-talk-router
Gateway aborted: config is invalid.
plugins.load.paths: plugin: plugin path not found:
/Users/shoichi/.openclaw/workspace/plugins/ai03-nextcloud-talk-router
After restoring ~/.openclaw/workspace from Time Machine and rolling back to 2026.5.12, openclaw doctor --non-interactive still reports:
Managed npm OpenClaw host peer links need repair:
- @openclaw/codex: missing
/Users/shoichi/.openclaw/npm/node_modules/@openclaw/codex/node_modules/openclaw
- @openclaw/nextcloud-talk: missing
/Users/shoichi/.openclaw/npm/node_modules/@openclaw/nextcloud-talk/node_modules/openclaw
Repair with openclaw doctor --fix to relink managed npm plugin packages.
Runtime/plugin mismatch symptoms were also observed:
[plugins] nextcloud-talk failed to load setup entry ...
TypeError: (0 , _setupRuntime.createSetupTranslator) is not a function
Cannot find package 'openclaw' imported from
/Users/shoichi/.openclaw/npm/node_modules/@openclaw/codex/dist/client-iRf11BEu.js
Current state after manual recovery
After Time Machine restore and rollback:
- Gateway is running again on
2026.5.12 openclaw health: OKopenclaw channels status --probe: Nextcloud Talk works~/.openclaw/workspacehas been restored- SQLite integrity checks for local OpenClaw sqlite files passed
- Remaining issue: managed npm plugin peer links / plugin registry consistency still need repair
Duplicate / related issue check
I searched existing GitHub issues and did not find an exact duplicate for:
2026.5.19~/.openclaw/workspace- workspace deletion during update/backup
- Time Machine restore after workspace deletion
However, several related issues appear to describe adjacent failure modes:
- [Bug]: Uninstall deletes workspace inside .openclaw even when "delete workspace" is unchecked #75052: Uninstall deletes workspace inside .openclaw even when "delete workspace" is unchecked
[Bug]: Uninstall deletes workspace inside .openclaw even when "delete workspace" is unchecked #75052 - Proposal: safer self-update with pre-update backup + health check + auto-rollback/restore #14526: Proposal: safer self-update with pre-update backup + health check + auto-rollback/restore
Proposal: safer self-update with pre-update backup + health check + auto-rollback/restore #14526 - @openclaw/codex 2026.5.18 can fail with ERR_MODULE_NOT_FOUND for package 'openclaw' unless openclaw is installed locally #83964: @openclaw/codex 2026.5.18 can fail with ERR_MODULE_NOT_FOUND for package 'openclaw'
@openclaw/codex 2026.5.18 can fail with ERR_MODULE_NOT_FOUND for package 'openclaw' unless openclaw is installed locally #83964 - [Bug]: @openclaw/codex peer link failure reproduced on 2026.5.19 after update #84715: @openclaw/codex peer link failure reproduced on 2026.5.19 after update
[Bug]: @openclaw/codex peer link failure reproduced on 2026.5.19 after update #84715 - 升级版本后配置文件中的插件路径未更新,导致 gateway 启动失败 #58626: Upgrade after plugin path not updated, gateway startup fails
升级版本后配置文件中的插件路径未更新,导致 gateway 启动失败 #58626 - [Bug]: 2026.5.18 gateway crashes on macOS with uncaught AssertionError
assert(!this.paused); rollback to 2026.5.12 stabilizes #83968: 2026.5.18 gateway crash / rollback to 2026.5.12 stabilizes
[Bug]: 2026.5.18 gateway crashes on macOS with uncaught AssertionErrorassert(!this.paused); rollback to 2026.5.12 stabilizes #83968
This issue appears distinct because it involves actual deletion of the active ~/.openclaw/workspace directory during the 2026.5.19 update/backup flow, not only plugin path drift or npm peer-link drift.
Why this is severe
~/.openclaw/workspace is not disposable runtime cache. It can contain user-authored operational files, memory, skills, scripts, local plugins, and business-specific automation.
Deleting it can cause:
- user data loss
- Gateway startup failure
- plugin path failure
- local automation loss
- assistant memory/personality loss
- local recovery requiring Time Machine or external backup
Request
Please investigate the 2026.5.19 update/backup/rollback implementation for any code path that can delete, replace, clean, or move ~/.openclaw/workspace.
Please also consider adding regression coverage for:
- Update from 2026.5.12 to 2026.5.19 with existing
~/.openclaw/workspace - Config containing
plugins.load.pathspointing into~/.openclaw/workspace/plugins/... - Managed npm plugins installed under
~/.openclaw/npm/node_modules - Rollback from 2026.5.19 to 2026.5.12
- Verification that:
- workspace still exists,
- configured local plugin paths still exist,
openclaw doctor --non-interactivedoes not report missing peer links,- Gateway can start without config validation errors.
Additional note
The exact internal code path that deleted ~/.openclaw/workspace has not yet been isolated. The user-visible fact is that the workspace disappeared during the 2026.5.19 update/backup flow and had to be restored from Time Machine.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 21, 2026
Thanks for the report. I checked current
main, but this shell is missing enough reproduction detail to verify a current bug.The reported May 2026 failure cannot be traced to a current update path or reproduced from the supplied command sequence, and both the updater and backup/restore implementations have changed substantially since then. The managed-plugin peer-link portion is now explicitly repaired; the remaining workspace-deletion claim needs a current reproduction with the exact command and logs.
Review details
Best possible solution:
Keep the current update, archive, restore, and peer-link safeguards; reopen with a current-release reproduction that identifies the invoked command, state/workspace layout, and redacted updater logs if workspace removal still occurs.
Do we have a high-confidence way to reproduce the issue?
No. The report identifies an old version and an observed aftermath but not the exact updater command or a current-release path; current source confines update cleanup to dedicated temporary handoff directories.
Is this the best way to solve the issue?
Not applicable for a new patch. Current source already has a non-destructive update/restore boundary and managed peer-link convergence, while the historical deletion mechanism is not identifiable from this report.
Security review:
Security review: No pull-request patch or standalone security report is under review.
AGENTS.md: found and applied where relevant.
What I checked:
docs/install/updating.md. (docs/install/updating.md:80, f804cdf44055)src/infra/update-managed-service-handoff-cleanup.ts:6, f804cdf44055)src/infra/backup-create.ts:348, f804cdf44055)src/cli/update-cli/post-core-plugin-convergence.ts:71, 571f364cd7b8)src/cli/update-cli/update-command.ts:195, f804cdf44055)docs/install/updating.md. (docs/install/updating.md:80, f804cdf44055)Likely related people:
src/infra/backup-create.ts,src/cli/update-cli/post-core-plugin-convergence.ts)src/cli/update-cli/post-core-plugin-convergence.ts,src/plugins/plugin-peer-link.ts)src/commands/uninstall.ts,src/commands/cleanup-plan.ts)Codex review notes: model internal, reasoning high; reviewed against f804cdf44055.
xieetudousi commentedon May 21, 2026
This is a nasty one. I had a similar scare on my macOS setup. Here's what I'd recommend doing right now for damage control and prevention:
Immediate steps:
Set up automated backup of ~/.openclaw/workspace before any future updates. This cron job works well:
�ash 0 */6 * * * tar czf ~/.openclaw/backups/workspace-.tgz -C ~/.openclaw workspace && find ~/.openclaw/backups -name '*.tgz' -mtime +7 -deleteConsider symlinking your workspace outside of
/.openclaw/ to insulate it from the update/cleanup paths:
/my-openclaw-workspace in your environment.�ash mv ~/.openclaw/workspace ~/my-openclaw-workspace ln -s ~/my-openclaw-workspace ~/.openclaw/workspaceThen set OPENCLAW_WORKSPACE_DIR=
The npm peer-link issue (openclaw doctor --fix) should resolve the remaining plugin state inconsistency. Run:
�ash openclaw doctor --fixThe workspace-nested-under-state-dir design is indeed fragile - the cleanup code in cleanup-utils.ts can recursively remove the state dir, and since workspace is nested under ~/.openclaw/, it's vulnerable to the same path. Hopefully the maintainers add a safeguard against this in the update/rollback flow.
If you want a fully configured backup + recovery solution (automated workspace backup, off-workspace symlink setup, and update-safe configuration), I offer deployment services that cover all of this. Let me know if you're interested.
19 remaining items