I am showed the following error when starting the gateway:
Failed to read config at /Users/papa/.openclaw/openclaw.json ReferenceError: Cannot access 'ANTHROPIC_MODEL_ALIASES' before initialization
at normalizeAnthropicModelId (file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:163883:2)
at normalizeProviderModelId (file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:163886:39)
at normalizeModelRef (file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:163899:10)
at parseModelRef (file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:163910:9)
at applyContextPruningDefaults (file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:4662:41)
at Object.loadConfig (file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:13703:88)
at loadConfig (file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:14151:20)
at primeConfiguredContextWindows (file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:81084:15)
at ensureContextWindowCacheLoaded (file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:81102:14)
at file:///usr/local/lib/node_modules/openclaw/dist/auth-profiles-iXW75sRj.js:81129:44
#incorrect openclaw.json file
1 messages · Page 1 of 1 (latest)
That stack trace is a known OpenClaw regression in 2026.3.12 (it’s not your JSON5 syntax). It crashes while doing an eager “context window warmup” during module init and hits a TDZ error: Cannot access 'ANTHROPIC_MODEL_ALIASES' before initialization.
First, confirm version:
openclaw --version
If it says 2026.3.12, the quickest fix right now is to downgrade to 2026.3.11 and restart the gateway:
pnpm:
pnpm add -g openclaw@2026.3.11
openclaw gateway restart
npm (if that’s how you installed it):
npm i -g openclaw@2026.3.11
openclaw gateway restart
Related upstream bug report (for tracking): https://github.com/openclaw/openclaw/issues/44781
If you paste your openclaw --version output I can tell you which side of the regression you’re on.
OpenClaw 2026.3.12 (6472949)
Yep — 2026.3.12 is the broken build for this (known regression). The fix right now is to downgrade to 2026.3.11 and restart the gateway.
If you installed globally with npm (your path suggests that), do:
npm i -g openclaw@2026.3.11
openclaw gateway restart
If gateway restart still shows “loaded but not running”, reinstall the LaunchAgent so it refreshes any cached entrypoint:
openclaw gateway uninstall
openclaw gateway install --force
openclaw gateway restart
Once it’s up, you can stay pinned on 2026.3.11 until a fixed release lands for 2026.3.12’s TDZ bug (tracking: https://github.com/openclaw/openclaw/issues/44781).
If this fixes it, please mark the solution (right-click the solution message → Apps → ✅ Mark Solution) so Answer Overflow indexes it.