BACK TO ARCHIVE
2026-04-05P1 CRITICAL
CASE #0064

2026.4.5 Gateway Silently Prunes and Persists Corrupted Config

The OpenClaw 2026.4.5 gateway stripped unrecognized config fields on startup, wrote the stripped version back to disk, and failed to restore from backup because the restoredFromBackup flag was hardcoded to false — resulting in permanent, silent config destruction across the user fleet.

CONFIRMED
💾 DATA LOSS
Incident Brief

OpenClaw 2026.4.5 introduced a config-parsing change that rejected fields not declared in the schema. The intent was forward-compatibility: strip unknown keys so they don't confuse the runtime. The implementation, however, did three destructive things: (1) it parsed the config, (2) it re-serialized and wrote the stripped version back to disk, overwriting the user's original file, and (3) when a subsequent sanity check detected the mismatch, it attempted restore-from-backup but the code path always evaluated restoredFromBackup=false, so the recovery was a no-op. Users who had custom fields — for experimental features, for third-party plugins, for their own tooling — lost them silently and irrecoverably on first restart after upgrade.

Root Cause

The Actual Culprit

Parse-then-overwrite on a user config file, combined with a hardcoded constant (restoredFromBackup=false) that silently disabled the only recovery path.

What Was Done
[OK]Immediate hotfix to stop rewriting config on startup
[OK]restoredFromBackup flag correctly derived from actual backup state
[OK]Unknown fields preserved and re-emitted on write
[OK]User advisory: restore .bak files manually where present
Lessons Learned
file-text

User config is not your playground

Touching a user's config file is a two-way trust operation. Lossy rewrites need an explicit user confirmation, not a silent 'we thought it was safe'.

archive

Hardcoded recovery flags are landmines

If your recovery path is always false because of a constant, your recovery path does not exist. Audit all flags that gate destructive operations.

Comments (0)

Loading comments...

0/1000
Case Info
Case Number
#0064
Severity
🔥P1 CRITICAL
Severity Level
Date
2026-04-05
Affected Systems
OpenClaw Gateway
Config Parser
Backup Restore Path
Source
twitter
Published: 2026-04-05