mirror of
https://github.com/openai/codex.git
synced 2026-05-01 20:02:05 +03:00
## Description This PR makes the SQLite state runtime tolerate databases that have already been migrated by a newer Codex binary. Today, if an older CLI sees migration versions in `_sqlx_migrations` that it doesn't know about, startup fails. This change relaxes that check for the runtime migrators we use in `codex-state` so older binaries can keep opening the DB in that case. ## Why We can end up with mixed-version CLIs running against the same local state DB. In that setup, treating "the database is ahead of me" as a hard error is unnecessarily strict and breaks the older client even when the migration history is otherwise fine. ## Follow-up We still clean up versioned `state_*.sqlite` and `logs_*.sqlite` files during init, so older binaries can treat newer DB files as legacy. That should probably be tightened separately if we want mixed-version local usage to be fully safe.