Codex skill for restoring Codex Desktop chat history after login, provider, or workspace switches make existing conversations disappear.
The skill repairs the durable sources Codex Desktop uses to rebuild visible threads:
sessions/**/rollout-*.jsonlandarchived_sessions/**/rollout-*.jsonlstate_5.sqlite.codex-global-state.json
Install this folder as a Codex skill, then ask Codex to use the restore-memory skill.
The bundled script can also be run directly:
python "$env:USERPROFILE\.codex\skills\restore-memory\scripts\restore_codex_chat_history.py" --dry-run
python "$env:USERPROFILE\.codex\skills\restore-memory\scripts\restore_codex_chat_history.py"Run --dry-run again after repair to verify the durable state is clean.
The script creates timestamped backups before writing to Codex state files. If Codex Desktop is running, fully quit it after repair and run the script again, because the app may write in-memory state on shutdown.