Problem
openclaw doctor --fix and --repair apply changes to the config without showing what will change beforehand. While --non-interactive limits to safe migrations, there is no way to preview the full set of changes doctor would make before committing them.
This is risky because doctor performs both migrations (structural changes) and repairs (value changes), and the user has no way to distinguish safe normalization from potentially destructive field modifications.
Evidence
- Incident where
openclaw doctor --fix silently stripped custom config fields, removing settings without warning. Required manual restoration from backup.
Workaround
I built oc-doctor-safe, a bash script that:
- Creates a timestamped backup before any doctor operation
- Captures doctor's intended changes without applying
- Shows a diff of what would change
- Generates a rollback script specific to this run
- Requires explicit confirmation before applying
- Supports
--rollback to undo the last run
Proposed Solution
Add a --dry-run flag to openclaw doctor:
# Show what doctor would change, without changing anything
openclaw doctor --dry-run
# Show changes as a unified diff
openclaw doctor --dry-run --diff
The output should clearly distinguish:
- Migrations (structural/path changes, generally safe)
- Repairs (value changes, potentially destructive)
- Removals (fields that would be deleted)
Impact
Medium. Builds user confidence in running doctor. Prevents accidental config loss, especially after major version upgrades.
Environment
- OpenClaw 2026.4.10 (npm, macOS)
Problem
openclaw doctor --fixand--repairapply changes to the config without showing what will change beforehand. While--non-interactivelimits to safe migrations, there is no way to preview the full set of changes doctor would make before committing them.This is risky because doctor performs both migrations (structural changes) and repairs (value changes), and the user has no way to distinguish safe normalization from potentially destructive field modifications.
Evidence
openclaw doctor --fixsilently stripped custom config fields, removing settings without warning. Required manual restoration from backup.Workaround
I built
oc-doctor-safe, a bash script that:--rollbackto undo the last runProposed Solution
Add a
--dry-runflag toopenclaw doctor:The output should clearly distinguish:
Impact
Medium. Builds user confidence in running doctor. Prevents accidental config loss, especially after major version upgrades.
Environment