Codex resume session: get back the Codex chat you closed, and the context that was on your screen
You closed the terminal, Codex went with it, and the session you were halfway through looks gone.
To resume a Codex session, open a terminal in the same folder and run codex resume --last, which skips the picker and resumes the most recent chat from that directory. For the part that wasn't in the chat, like the docs tab or Slack thread you were reading, ReMynd's Codex & ChatGPT switch sets up Codex so it can search your screen history.
If --last picks the wrong chat, run codex resume and choose from the picker. ReMynd works from what was on your screen after install.
Lost a Codex session and the context you had on screen with it? Let Codex search what you saw. Download the ReMynd desktop app
Is a closed Codex session gone?
A closed Codex session isn't gone by default. The Codex CLI is a coding agent from OpenAI that runs locally on your computer, and OpenAI's advanced config page says that by default Codex saves local session transcripts under CODEX_HOME. The better question is what the transcript doesn't hold. In our view that's the part that hurts, like the error you read in another window.

Resume brings back the conversation, and your screen history covers what was around it. Illustration by ReMynd.
The 4 ways back into a Codex chat
Each way back into a saved chat finds sessions differently.
codex resume --last. OpenAI's CLI reference says it skips the picker and resumes the most recent chat from the current working directory.- The picker.
codex resumewith no argument opens it. Inside the CLI,/resumedoes the same, with a scope of Cwd, Repo (when available) or All, and Ctrl+T previews the selected chat. - An ID or a name.
codex resume <SESSION_ID>takes a uuid or a session name. Name chats with/renameso you can find them later. - A fork.
codex forkforks a previous interactive session into a new chat, preserving the original transcript. Use it when you want to try a different approach from the same point, and see Codex undo changes to revert the files themselves.
Which command gets which session back?
Each command reaches a different set of sessions, so pick by what you know about the one you lost.
| What you run | What it does | Source |
|---|---|---|
codex resume --last | Resumes the most recent chat from the current working directory | OpenAI CLI reference |
codex resume --last --all | Includes sessions outside the current working directory when picking the most recent | OpenAI CLI reference |
codex resume <SESSION_ID> | Resumes that session; the ID can be a uuid or a session name | OpenAI CLI reference |
/resume in the CLI | Opens the picker with Cwd, Repo (when available) or All scope; reloads the transcript, keeping the original history intact | OpenAI CLI reference |
codex exec resume --last | Resumes a non-interactive exec session; --last continues the most recent session from the current working directory | OpenAI CLI reference |
codex unarchive <id or name> | Restores an archived interactive session | OpenAI CLI reference |
| Computer History (OpenAI) | Memories and a timeline of recent computer activity that ChatGPT and Codex can reference; off by default for ChatGPT Pro, Business and Enterprise users in the ChatGPT desktop app on macOS; Pro users can choose to turn it on, and Business and Enterprise members need an administrator to grant access first; it also requires Memories and is not available with an API key or Amazon Bedrock | OpenAI Computer History docs |
| ReMynd's Codex & ChatGPT switch | Sets up Codex so it can search your screen history | ReMynd's Codex page |
How do I resume a Codex session after closing it?
The steps match OpenAI's docs as of December 2026. Use this simple decision path, in order:
- Go back to the same folder.
--lastis scoped to the current working directory, so open the terminal where you started. - Run
codex resume --last. If the chat it opens isn't the one you wanted, quit and use the picker. - Widen the search. Add
--all, or type/resumeinside Codex and pick All. - Answer the directory prompt. If your current folder differs from the session's saved directory, Codex asks which one to use. Set
tui.resume_cwdto "current" or "session" to stop the prompt. - Check whether history was saved. OpenAI's example path is
~/.codex/history.jsonl. The same page says[history] persistence = "none"disables local history persistence, and ahistory.max_bytescap drops the oldest entries when the file exceeds it. - Bring back what was on screen. Ask Codex something like "search ReMynd for the stack trace I was reading before I closed this." This needs ReMynd running before you closed it.
- Name the next one. Type
/rename auth-refactormid-session, socodex resume auth-refactorcan find it by name.
If the resumed chat starts repeating something you already ruled out, the fix is the same as in Claude Code keeps suggesting the fix I already tried. On Claude Code instead? See recover Claude Code session after a crash.
How does ReMynd bring back what you saw?
ReMynd is a desktop app that gives your computer local photographic memory, for you and your AI agents. The setup on a Mac, from its Codex page:
- Download ReMynd for Mac, grant screen-recording permission and let it run. There is nothing to search until it has been recording. Apple's guide puts that permission in System Settings under Privacy & Security, Screen & System Audio Recording.
- In ReMynd, open Settings → Integrations and turn on Codex.
- Restart Codex, and the Codex-hosted ChatGPT desktop app if you use it. ReMynd appends a managed block to
~/.codex/config.toml. - After you resume, ask Codex about something you saw before you closed it, like an error, a config value, or a page you had open.
You can run the same search yourself with ~/.local/bin/remynd search "design review". ReMynd's page calls it context at the moment you ask. For the Slack version of this problem, see how do I give Codex the bug report I read in Slack, and for what Codex keeps on its own, how Codex memories work in the ChatGPT desktop app. More on agents and screen history is on ReMynd's page for engineers.
What are the limits?
- ReMynd doesn't restore Codex's chat.
codex resumeand/resumedo that. - ReMynd captures only what is on your screen, starting from install. It cannot recover past work, and it cannot see background or cloud agents.
- Text recognition reads the window you're working in, not the ones behind it.
- The ChatGPT website will not show ReMynd's helper. That site only accepts remote HTTPS MCP servers.
- Codex uses its own model under your account, so what it retrieves may be sent to that model, the same way anything you paste into it would be. Recordings and the searchable index are stored on your computer by default, and connecting Codex is your choice.
- On a Mac, ReMynd needs Apple silicon and macOS 15 or later. ReMynd also runs on Windows 11 (x64 or arm64), where the Codex & ChatGPT switch writes the remynd-mcp entry into config.toml.
The short version
Resume from the same folder first. If the chat comes back and the context around it doesn't, that part was on your screen. If you're moving between Codex and Claude Code, recover Claude Code session after a crash covers the Claude side.
Don't want a closed terminal to take the context on your screen with it? Let Codex search what you saw. Download the ReMynd desktop app