Skip to content

openclaw doctor --fix overwrites valid config without backup #12858

@wrytn

Description

@wrytn

Summary

Running openclaw doctor --fix overwrites a valid, working configuration file with its own "corrected" version, which may not match the user's intended setup. No backup is created.

Steps to Reproduce

  1. Have a working config with customizations (plugins, model overrides, exec policy, etc.)
  2. Run openclaw doctor --fix
  3. Config is overwritten — customizations lost

Expected

doctor --fix should either:

  • (a) Create a backup before modifying
  • (b) Only fix actual errors while preserving valid settings
  • (c) Prompt before overwriting

Workaround

Never run openclaw doctor --fix on a configured gateway.

Impact

Destructive — total loss of gateway configuration, same as a config wipe on restart but user-initiated.

Environment

  • macOS 15 (arm64)
  • OpenClaw 2026.2.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions