OpenClaw "Refusing to run automatic gateway startup migrations"
Last checked
The error
Refusing to run automatic gateway startup migrations because this OpenClaw binary (2026.6.33) is older than the config last written by OpenClaw 2026.7.1.
Run the newer openclaw binary on PATH, or reinstall the intended gateway service from the newer install.
Set OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 only for an intentional downgrade or recovery action.The two version numbers change with your setup. This example is from openclaw/openclaw#112391. Newer releases may word the recovery hint differently.
OpenClaw records which version last wrote your config. When the Gateway starts from a binary older than that, it refuses to run startup migrations so the older code cannot damage newer data, and the Gateway does not come up. It means two installs are in play: you updated with one, and the service is starting another. Reinstall the Gateway service from the newer install with openclaw gateway install --force, check that openclaw gateway status shows one install and the version you expect, and remove the older install.
Why it happens
A downgrade guard. The config was last written by a newer OpenClaw, but the process starting the Gateway is an older binary, so OpenClaw stops before migrations run.
- The Gateway service still points at an older install. You updated the CLI on your PATH, but the systemd unit, launchd plist or scheduled task starts a different, older copy.
- Two installs on one machine, for example a global npm install and a copy installed another way. Whichever one starts the service last wins.
- A container tag that moved backwards. Issue #112391 was the Docker :latest tag regressing from 2026.7.1 to 2026.6.33, which tripped this guard on startup.
- A deliberate rollback of the package without restoring the matching config and state backup.
The fix
- 1 See which binaries and versions are involved: openclaw --version reports only the CLI on your shell's PATH, so also run openclaw gateway status, which shows the install the service uses.
- 2 Reinstall the service from the newer install: openclaw gateway install --force. The docs note that --force reinstalls an existing install and may restart a running Gateway.
- 3 Check it came up: openclaw gateway status, then openclaw health.
- 4 Remove the older install so the two cannot fight again, then run openclaw gateway status once more.
- 5 On Docker, pin an explicit version tag instead of :latest.
- 6 Set OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 only if you are downgrading on purpose and have a backup of config and state from before the newer version ran.
openclaw gateway install --forceStill failing?
- The service starts the old binary again after a reboot. Another installer or updater is rewriting the service file. Remove that install.
- The Gateway now starts but says config validation failed. See the config validation page.
- You rolled back on purpose and the Gateway still refuses. Restore the config and state backup from before the newer version, not only the package.
Related errors
Hit a different error?
Paste any agent error and get the cause and fix in seconds.
Frequently asked questions
Why does OpenClaw refuse to run gateway startup migrations?
The binary starting the Gateway is older than the version that last wrote your config. OpenClaw refuses so old code does not run migrations against newer data.
How do I fix it without losing my setup?
Point the Gateway service at the newer install with openclaw gateway install --force, confirm with openclaw gateway status and openclaw health, then remove the older install. Your config stays in place.
Should I set OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1?
Only for an intentional downgrade or recovery, and only with a backup. It lets older code act on newer state, which is what the guard exists to prevent.
Why did this start after an update?
The update wrote the config with the new version, but the service kept starting an older copy, often a second install or a pinned container tag.
Stop firefighting agent errors
Decoding errors one at a time is the manual version of what BetterClaw automates. Run your agents on a no-code AI agent platform with managed models, retries and config validation built in.
Free plan available · Pro $49/mo · BYOK · 7-day free trial
