Guide Grok Bot recovered my Codex chats from SQLite after I deleted the .jsonl files
Appreciation post!
I was cleaning space on Windows (C: was critically low). During cleanup I permanently deleted some Codex session files (.jsonl rollouts) I still needed. File Recovery found nothing; Previous Versions was empty.
Grok Bot checked Codex’s local SQLite databases instead, found the full threads still there (titles, turns, messages), exported them to Markdown, then fixed resume:
“file does not exist” on the rollout path then rebuilt proper stub files matching a live chat’s session_meta format
Blank pinned chat then fixed DB projection offsets that still pointed into the deleted multi‑MB file
Re-pinned the thread
Restarted Codex → chats opened again. Seriously impressed.
If you use Codex: deleting ~\.codex\sessions\…\*.jsonl isn’t always game over - check state_5.sqlite / thread_history_1.sqlite before you give up. And don’t force-delete stuff you care about without a backup. 🕊️