← Back to library

doctor --fix 未移除未知配置键:改用“手工修复 + 复检”防止 gateway crash-loop

问题/场景:`openclaw doctor --fix` 报告已修复未知键,但配置文件仍保留非法字段,导致 gateway 启动循环失败。前置条件:你可编辑 `~/.openclaw/openclaw.json` 并可执行 doctor。实施步骤:先用 doctor 定位未知键,再手工删除并重跑 doctor + gateway 启动验证。关键命令:`openclaw doctor`、`openclaw doctor --fix`、`openclaw gateway status`。验证:doctor 无未知键告警且 gateway 稳定启动。风险与边界:手工改配置前需备份,避免误删有效字段。来源:Issue #22272。

GITHUBDiscovered 2026-02-21Author openclaw community
Prerequisites
  • Gateway is failing or unstable due to schema validation errors from unrecognized config keys.
  • You have permission to back up and edit the OpenClaw config file directly.
Steps
  1. Run `openclaw doctor` to list unknown keys and note exact paths.
  2. Run `openclaw doctor --fix`; if keys remain, back up config and remove the reported keys manually.
  3. Re-run `openclaw doctor` until no unknown-key findings appear.
  4. Restart/verify gateway and confirm crash-loop is gone.
Commands
openclaw doctor
openclaw doctor --fix
openclaw gateway status
Verify

Unknown-key warnings disappear and gateway remains running across restart cycles.

Caveats
  • Until upstream fix lands, treat `doctor --fix` output as advisory and verify file diffs yourself.
  • Wrong manual edits can invalidate config further; keep a timestamped backup for rollback.
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post