openclaw - 💡(How to fix) Fix Config changes reverted by `openclaw doctor --non-interactive` on gateway restart [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78295Fetched 2026-05-07 03:38:42
View on GitHub
Comments
1
Participants
2
Timeline
10
Reactions
2
Timeline (top)
mentioned ×3subscribed ×3cross-referenced ×2commented ×1

Configuration changes made to ~/.openclaw/openclaw.json are being silently reverted when the gateway restarts. The openclaw doctor --non-interactive command runs automatically on restart and overwrites user-configured model assignments.

Error Message

  1. Add a config lockfile or hash to detect and warn about unexpected changes

Root Cause

Configuration changes made to ~/.openclaw/openclaw.json are being silently reverted when the gateway restarts. The openclaw doctor --non-interactive command runs automatically on restart and overwrites user-configured model assignments.

Fix Action

Workaround

Currently the only workaround is to have an agent or script reapply config changes after every restart, which is not sustainable.

RAW_BUFFERClick to expand / collapse

Summary

Configuration changes made to ~/.openclaw/openclaw.json are being silently reverted when the gateway restarts. The openclaw doctor --non-interactive command runs automatically on restart and overwrites user-configured model assignments.

Steps to Reproduce

  1. Edit ~/.openclaw/openclaw.json to change agent model assignments (e.g., agents.list[1].model)
  2. Save the file
  3. Restart the gateway (e.g., via MCP gateway restart tool or process restart)
  4. Check the config - changes have been reverted to previous values

Expected Behavior

User configuration changes should persist across restarts. The doctor command should not modify config without explicit user consent.

Actual Behavior

  • openclaw doctor --non-interactive runs automatically on restart
  • It reverts model assignments back to defaults or previous values
  • No warning or log message indicates changes were made
  • User must manually reapply config changes after every restart

Impact

Critical for usability:

  • Requires dedicated agent to fix configuration "3 times a day"
  • Model tree configurations (28+ models) get gutted to minimal set (4 models)
  • Cron jobs fail with "model not in allowlist" errors after restart
  • Users lose trust that their configuration will persist

Environment

  • OpenClaw Version: 2026.4.x (current)
  • Platform: macOS
  • Config path: ~/.openclaw/openclaw.json

Suggested Fix

  1. doctor --non-interactive should never modify config without explicit --fix flag
  2. If doctor must run on restart, it should only validate, not modify
  3. Add a config lockfile or hash to detect and warn about unexpected changes
  4. Add --preserve-config flag to gateway restart

Workaround

Currently the only workaround is to have an agent or script reapply config changes after every restart, which is not sustainable.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING