Codex App update uses ~/.codex/sqlite without migrating existing goals_1.sqlite, making old goals disappear
What version of the Codex App are you using (From “About Codex” dialog)?
26.609.41114
What subscription do you have?
ChatGPT Pro 20x
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
After updating the Codex App, all of my existing /goal entries disappeared from the UI.
The goals feature itself was still enabled. codex features list showed goals stable true.
After checking the local files, it looks like the app is now using CODEX_SQLITE_HOME=/Users/<user>/.codex/sqlite, so the active goals database became /Users/<user>/.codex/sqlite/goals_1.sqlite.
However, my existing goals were still present in the old database at /Users/<user>/.codex/goals_1.sqlite.
Before manual recovery:
/Users/<user>/.codex/sqlite/goals_1.sqlitehad 1 goal row./Users/<user>/.codex/goals_1.sqlitehad 4 older goal rows.
After manually importing the missing thread_goals rows from the old database into the new database, the goals appeared again.
What steps can reproduce the bug?
I cannot fully reproduce from a clean setup now because I already recovered the data manually, but the observed sequence was:
- Have existing persistent
/goalentries stored in$CODEX_HOME/goals_1.sqlite. - Update or run a Codex App version that uses
CODEX_SQLITE_HOME=$CODEX_HOME/sqlite. - Open the Codex App.
- The old goals no longer appear in the UI, even though the goals feature is enabled.
- Compare the old and new goal databases:
sqlite3 ~/.codex/goals_1.sqlite "SELECT status, COUNT(*) FROM thread_goals GROUP BY status;"
sqlite3 ~/.codex/sqlite/goals_1.sqlite "SELECT status, COUNT(*) FROM thread_goals GROUP BY status;"
In my case, the missing goals were still present in the old database, but not in the new active database.
What is the expected behavior?
When the app changes the SQLite-backed state directory from $CODEX_HOME to $CODEX_HOME/sqlite, existing goals_1.sqlite data should be migrated automatically, or the app should continue reading the old database until migration succeeds.
Persistent /goal entries should not disappear from the UI after an update.
Additional information
I searched existing issues and found related local-state/goals issues, but not this exact migration case:
- #27911 mentions
goals_1.sqlite, but is about write amplification. - #28188 is about
/goalsessions not being saved after usage limits. - #23851 and #24510 are related to local state/history behavior, but not old
goals_1.sqlitedata not being migrated into$CODEX_SQLITE_HOME.