TechBroz · techbroz.com64 incidents on record · updated as they happen
← Today in agent chaos

Agent chaosAs reported·15 Nov 2026

After a container restore, Codex deleted the log file it was still writing to, and new writes quietly vanished

As reported One person’s public account. We couldn’t independently confirm it, and we’ll update this if the facts change.

As reported: Codex CLI, restored from a container checkpoint on another Kubernetes node, deleted the write-ahead log of its own live log database. It kept writing to the deleted file, so new rows were silently lost.

This is one person's account on GitHub, not independently confirmed. It was filed in the Codex public issue tracker late on 14 November, and unlike most bug reports it comes with measurements and a script that reproduces the problem.

What happened

The user runs Codex CLI version 0.160.0 non-interactively inside a Kubernetes pod on Linux ARM servers. The container is checkpointed with a tool called CRIU and restored on a different node. On the new node the files come back at the same paths with the same contents, but the operating system sees them as different files.

Codex keeps several connections open to each of its local SQLite databases, for state, logs, goals, memories, queue and thread history. SQLite works out which connections belong together by the file's identity. After the restore, the old connections still carry the old identity, while a connection opened afterwards sees a new one.

How it went wrong

When that newer connection closed, it believed it was the last one using the database. So it tidied up: it checkpointed the log and deleted the database's write-ahead log and shared-memory files. Closing it also dropped the file locks the restored connections were holding.

The restored connections didn't notice. They carried on writing into files that no longer existed on disk. The report says that 10 minutes after a restore, the 7.5 MiB write-ahead log for the logs database was deleted but still open and mapped by Codex, and the locks on it were gone. In a local reproduction, a row written by a restored connection was invisible to any other process: a silent loss until that connection's next checkpoint.

What could be worse

The user also flags a risk they inferred from the code but did not measure: two sets of connections with two separate logs over the same database, with nothing stopping them clashing, could overwrite each other's pages and corrupt the database. When we checked, one other commenter had added a code-level analysis suggesting the fix needs to cover every live connection, and there was no public reply from OpenAI.

Our take

This is a niche setup, but the lesson travels. Agents now keep real state on disk, and anything that moves a running agent between machines can break assumptions its database relies on. Close or reopen every database connection around a checkpoint and restore, and check that your agent's logs are actually landing before you trust them in an audit.

Lesson for builders

Before you move a running agent between machines, close every database connection it holds, or its logs can quietly stop saving.

Fail card: After a container restore, Codex deleted the log file it was still writing to, and new writes quietly vanished
The fail card

This story in one shareable card. Tap to open it full size.

Share on X All fail cards →

More agent chaos

Every day of agent chaos →

More fails

Get TechBroz Weekly free → All 64 fails