Config Validation Failed / Unrecognized Key
Error: Unrecognized key / Config validation failed / SyntaxError: Unexpected token in JSON
OpenClaw troubleshooting · Updated 2026
Error Message
Error: Unrecognized key / Config validation failed / SyntaxError: Unexpected token in JSON
What Causes This
Your openclaw.json has a syntax error (missing comma, unescaped character) or contains a key that doesn't exist in the current schema. This often happens after manual editing or after an upgrade that renamed or removed config keys.
How to Fix It
Validate and fix your config:
# Validate the config
openclaw config validate
# If it's a JSON syntax error, lint it:
cat ~/.openclaw/openclaw.json | python3 -m json.tool
# Common fixes:
# - Remove trailing commas (JSON doesn't allow them, but JSON5 does)
# - Escape backslashes in Windows paths: "C:\\Users\\..."
# - After upgrade: renamed keys — run:
openclaw doctor --fix
# Nuclear option: back up and regenerate
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
openclaw onboard
Known breaking changes: gateway.token → gateway.auth.token (v2026.3.7+), channels.discord.modelByChannel format changed (v2026.2.21+), CLAWDBOT_* / MOLTBOT_* env vars removed (v2026.3.22+).