Documentation
On this page
  1. Claude Code
  2. Pick up the last conversation
  3. Choose from a list
  4. Resume a specific session
  5. Try something without losing the original
  6. Inside a running session
  7. Codex
  8. Pick up the last conversation
  9. Choose from a list
  10. Resume a specific session
  11. Resume from a script
  12. Why it came back empty
  13. What comes back, and what doesn't
  14. Quick reference
  15. Where Joxo fits
  16. Frequently asked questions
  17. How do I resume my last Claude Code session?
  18. How do I resume a Codex session?
  19. Why does claude --continue start a new conversation?
  20. Where are Claude Code sessions saved?
  21. Try it with your team

Blog / claude code

Resume a Claude Code or Codex session you closed

Closed the terminal mid-task? Claude Code and Codex both keep the conversation. The commands to pick it up again, and why --continue can come back empty.

You closed the terminal, your laptop restarted, or you hit Ctrl+C one time too many, and the agent was halfway through a task. The work isn't lost. Claude Code and Codex both save every conversation to disk as it happens, and both can open it again with the full history, so the agent remembers what it was doing.

We tested every command below with Claude Code 2.1.312 and Codex CLI 0.164. In each test we told the agent to remember a word, ended the session, resumed it, and asked for the word back.

Claude Code#

Pick up the last conversation#

bash
claude --continue

(claude -c for short.) This opens the most recent conversation in the current folder. That last part matters: we gave Claude a word in one project folder, then ran claude --continue in another, and it had no idea what we meant. It had opened that other folder's conversation instead. Always cd into the project first.

Choose from a list#

bash
claude --resume

(claude -r.) With no argument, it opens a picker of this folder's past conversations: type to search, and press Ctrl+A to show sessions from all your projects.

Resume a specific session#

Every session has an ID. Pass it to --resume and Claude opens exactly that one:

bash
claude --resume 518158cf-fa6b-485b-8cc6-15d53d0768e2

This worked even from a different folder: our session started in one project, we resumed it by ID from another, and Claude still remembered the word.

IDs are hard to remember, so give sessions a name when you start them:

bash
claude --name login-fix

Then later:

bash
claude --resume login-fix

We tested both the ID and the name; each brought back the same conversation.

Try something without losing the original#

bash
claude --resume login-fix --fork-session

This opens a copy with a new session ID. The copy has the full history, but whatever you do next doesn't change the original, so you can try a different approach and still go back.

Inside a running session#

Type /resume to open the same picker without leaving Claude Code.

Codex#

Pick up the last conversation#

bash
codex resume --last

Like Claude Code, Codex only looks at sessions from the current folder. Add --all to see sessions from every folder.

Choose from a list#

bash
codex resume

This opens a picker you can search, and filter by folder or show all. If a session you started with codex exec (a script or a scheduled job) is missing from the list, add --include-non-interactive: by default Codex leaves those out.

Resume a specific session#

bash
codex resume 01a18682-331d-7663-b648-2cef1fe2a5bc

Codex prints the session ID when a session starts (session id: …) and accepts a session name in the same place. Resuming by ID worked from another folder too.

Resume from a script#

For codex exec, resume is a subcommand of exec, and you can give the next instruction right away:

bash
codex exec resume --last "Carry on with the next step."

We gave Codex a word in one codex exec run, then ran codex exec resume --last "What word did I ask you to remember?". It answered with the word.

Why it came back empty#

  • Wrong folder. --continue and --last only look at the current folder. cd into the project, or resume by ID or name.
  • The newest session isn't the one you wanted. If you started a quick new session after the one you care about, --continue opens the quick one. Use the picker (claude --resume, codex resume) instead.
  • A Codex exec session isn't in the picker. Add --include-non-interactive.
  • The folder moved. Sessions are stored by folder path. Claude Code keeps them in ~/.claude/projects/, in a subfolder named after the project's path. Codex keeps them in ~/.codex/sessions/, by date. Rename or move the project folder and --continue starts looking somewhere new. Resuming by ID still works.

What comes back, and what doesn't#

The conversation comes back: your messages, the agent's replies, the files it read, and the commands it ran. The world around it doesn't. A dev server the agent started, an install that was half done, or a test still running when the terminal closed has stopped. After resuming, a short "check where we are and carry on" is usually enough: the agent reads the history, looks at the files, and continues.

Your code changes are on disk regardless of the session. git status shows what the agent changed before it stopped.

Quick reference#

What you wantClaude CodeCodex
Last conversation hereclaude -ccodex resume --last
Pick from a listclaude -rcodex resume
A specific sessionclaude -r <id or name>codex resume <id or name>
Name a new sessionclaude --name <name>
Copy, keep the originalclaude -r <id> --fork-session
From a scriptclaude -c -p "…"codex exec resume --last "…"

Where Joxo fits#

Resuming works on the computer where the session ran. When the work needs to move, to your phone or to a teammate's agent, Joxo carries it: you see every session from your phone and can answer it from there, and an agent can hand a task with its context to another agent, on your computer or a teammate's. Get the desktop app to see all your sessions in one place.

Frequently asked questions#

How do I resume my last Claude Code session?#

In the same project folder, run claude --continue (or claude -c). To choose an older one, run claude --resume.

How do I resume a Codex session?#

Run codex resume --last in the same folder, or codex resume to pick from a list. For sessions started with codex exec, use codex exec resume --last.

Why does claude --continue start a new conversation?#

It only looks at sessions from the current folder. If you're in a different folder, or the project was moved, it finds nothing to continue. Use claude --resume and pick the session, or pass its ID.

Where are Claude Code sessions saved?#

In ~/.claude/projects/, one subfolder per project path, one file per session. Codex saves its sessions in ~/.codex/sessions/.

Something missing or wrong? Support reaches a person.