"OpenClaw config is invalid": the gateway won't start after you edited openclaw.json
OpenClaw config is invalid
Also appears as (4)
gateway: Unrecognized key: "prot"<root>: JSON5 parse failed: SyntaxError: JSON5: invalid characterInvalid config at ...config reload skipped (invalid config)
We reproduced the error and confirmed the fix on our own test machine on the date shown. Nightly CI re-runs are not running yet. How we verify.
- Last verified
- Re-test due
- Published
- Fix ID
AGT-11
Environment and versions
| os | Debian 13 (container) |
|---|---|
| node | 26.12.1 |
| openclaw | 2026.10.7 (157d8c2) |
In brief
OpenClaw rejects unknown keys and invalid JSON5. The full fix covers both cases, what `doctor --fix` really does to your config (it is not harmless), and how to confirm the config is valid again.
Symptom
You hand-edited ~/.openclaw/openclaw.json, or an AI pasted a snippet into it. Now openclaw gateway stops immediately with:
OpenClaw config is invalid
File: ~/.openclaw/openclaw.json
Problem:
- openclaw.json:2 — gateway: Unrecognized key: "prot"
...
Run "openclaw doctor --fix" to repair the config, then retry.
or, for a typo in the JSON itself:
- <root>: JSON5 parse failed: SyntaxError: JSON5: invalid character '"' at 4:5
Why it happens
- OpenClaw checks the whole config on startup and refuses anything it doesn't recognise, including misspelled keys and settings in the wrong place.
- The file must also be valid JSON5. A missing comma or a stray character breaks the whole file.
What we could not test
- Automatic migration of legacy keys after upgrades, the
.clobbered.*/.rejected.*recovery files, and configs that use$include. - Hot-reload of an edited config while the gateway runs.
- Docker or Nix installs, macOS and Windows.
The full fix
$4The free part of this page tells you what's wrong. The full fix tells you exactly what to do. It includes:
- Step-by-step fix, safest option first (the full page is 474 words)
- 2 copy-paste blocks of commands, config or code
- How to check it worked
- Our test record from Oct 26, 2026: what we ran and what happened
Launching soon. Checkout isn't open yet; prices may change at launch. Join the waitlist. You can check what you'll get: SHA-256 of the full fix dfb37473a2122886… (how to check).
Sources
How this page was made
Drafted by an AI agent and reproduced on our test machine on Oct 26, 2026. The scripts and logs are in the repro bundle; their file hashes are public on the repro page. Human review: not yet. No warranty: try fixes on a copy or staging environment first. Machine-readable versions: Markdown · JSON.
Found a mistake or a newer version where this breaks? Tell us.