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
- Run `openclaw doctor` to list unknown keys and note exact paths.
- Run `openclaw doctor --fix`; if keys remain, back up config and remove the reported keys manually.
- Re-run `openclaw doctor` until no unknown-key findings appear.
- Restart/verify gateway and confirm crash-loop is gone.
Commands
openclaw doctoropenclaw doctor --fixopenclaw gateway statusVerify
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 ↗