"This Codex session changed before your message could run. Please send it again."
Last checked
The error
This Codex session changed before your message could run. Please send it again.Shown in the chat (Telegram, the Control UI or another channel) when OpenClaw runs the agent on the Codex harness.
OpenClaw shows this when the Codex session it was about to use was replaced before your message ran (internally, "Codex session generation is no longer current"). On OpenClaw 2026.10.10 and later, the usual reason is that the SQLite worker holding the session crashed out of memory and restarted, the same bug that produces "Agent database execution admission is closed". Resend once. If it repeats on every message in the same session, start a new session for the agent and follow the admission-closed fix.
Why it happens
The Codex harness tracks which session generation a message belongs to. When the session is superseded before the turn starts, OpenClaw refuses to run the message on the stale session and asks you to resend. Issue openclaw/openclaw#191847 shows this message appearing in chat each time the 512 MB SQLite worker was killed and recreated by a very large session.
- The SQLite worker crashed and restarted mid-turn because one session grew too large (issue #191847). This is the case if the Gateway log shows ERR_WORKER_OUT_OF_MEMORY.
- A one-off: the session really was replaced between your message and the run, for example by a restart. A single resend works.
The fix
- 1 Resend the message once.
- 2 If it fails again, check the Gateway log for ERR_WORKER_OUT_OF_MEMORY or "Agent database execution admission is closed".
- 3 If either appears, start a new, separate session for the same agent. /new inside the same session did not help the reporter, because the session id stays the same.
- 4 Then follow the "admission is closed" page: find and archive the oversized session, or roll back from a pre-update backup.
Still failing?
- Every agent shows it, not one session. Check whether the Gateway itself is restarting.
- You get a 403 instead. See the "cannot verify the owner" page.
Related errors
Hit a different error?
Paste any agent error and get the cause and fix in seconds.
Frequently asked questions
Why does OpenClaw tell me to send my message again?
The Codex session your message was queued for was replaced before it ran, so OpenClaw would not run it on a stale session. On 2026.10.10 and later the usual cause is the session's SQLite worker crashing out of memory and restarting.
Is this a Codex or an OpenClaw problem?
The message comes from OpenClaw's Codex harness. Switching the agent to the claude-cli harness did not help the reporter of issue #191847, because the session database underneath is the same.
Does it lose my message?
The message did not run. In the reported case, replies that had already finished generating were also not delivered, so resend anything important.
How do I stop it happening on every message?
Start a new, separate session for that agent and archive the old one. That is the workaround users confirmed until a release fixes the worker crash.
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
