Skip to main content
o4 saves every interactive conversation as a session, so you can close the terminal and pick up where you left off later. This page covers how to resume a session, branch it with a fork, rename it, export or copy the transcript, and delete sessions you no longer need.

Resume a session

When you quit o4, it prints a summary with the command that resumes the session:
The Title: line appears only once the session has a title. There are three ways to resume: When you resume, the transcript comes back, the model continues with the full conversation, and you can go on typing. /resume <id> ends the current session first, the same way quitting does (it stays saved), then restarts o4 on the other session. o4 resume <id> with an ID that doesn’t exist fails with Error: Session '<id>' not found. A resumed session comes back on the model and reasoning level it was left on. To pick another model, pass it when you resume, for example o4 -m anthropic:claude-sonnet-4-6 resume <id>, or use Resume with model… in the picker; --reasoning picks the level. If the saved model is no longer available, o4 starts on your default model instead. With the model router turned on, the saved model is the router’s first choice, after a model you pass with -m. If the session had other tabs open, they open again too, behind the resumed one and in the same order, each on its own model and reasoning level. A tab whose session can’t be opened any more is left out, and o4 shows Could not reopen 1 recorded tab(s); resume them with /resume <id>. A session’s saved history can grow past 1 GiB and still be resumed: o4 reads it one record at a time. With interactive_sessions turned on in the [daemon] section of ~/.o4/config.toml, a window’s session runs in the o4 daemon instead, so a response keeps going after you close the window, and o4 resume <id> opens it again in a window. A session that ran inside a window, such as one from before you turned it on, reopens in the window, and o4 says Local only: this session ran inside an o4 window, so it reopens in this window. o4 has no flag that resumes the most recent session. Run o4 resume in the project instead: the picker lists that project’s sessions with the most recently updated at the top, after any pinned ones. If you run o4 resume with no terminal attached, for example in a script, it prints the session list from every directory instead of opening the picker.

Catch up on a session

The recap line

When you’ve been away, o4 leaves a one-line recap at the end of the chat, saying what was done and where things stand:
o4 writes it three minutes after the model stops, but only if all of these hold:
  • you’re away: the terminal isn’t focused, or the session is in a tab you aren’t looking at
  • the session has finished at least three turns
  • the prompt box is empty
  • something happened since the last recap
The recap is one or two sentences in your language, at most 400 characters. It’s for you only: it isn’t added to the conversation, the model never sees it, and it isn’t saved in the transcript or included in /export and /copy all. When you resume a session, its latest recap appears at the end of the chat. In Ringside, a session with nothing running shows its latest recap on its row. Writing a recap is one extra request. It reuses the session’s model and its prompt cache, or goes to your helper model if you set one. If the request fails, o4 tries again later, waiting longer each time (one minute, then 5, 15 and 60 minutes), and stops after five failures in a row. Turn recaps off with Session recap in /config (General tab); /tldr keeps working.

Get a summary with /tldr

/tldr shows a card of at most 12 lines about the session. /debrief and /summary do the same. It works while the model is working, too.
Changed and Checked come from o4’s own records, so they show at once. In short says summarising… until the model answers. If the summary request fails, the card says why and keeps the rest. Checked counts every test_run call and shell commands that start with cargo test, cargo check, cargo clippy, cargo build, npm test, pnpm test, yarn test, pytest, go test, make test or just test.

The session picker

The picker shows one card per session with its title, model and directory. It opens with only the sessions from the current checkout: your git repository and its linked worktrees, or just the current directory outside git. Press Tab to see sessions from every directory. Pinned sessions come first, then the most recently updated. The actions menu offers Resume, Resume with model…, Fork, Rename, Pin/Unpin and Delete…. Use Resume with model… to continue a session on a different model. Delete… asks you to confirm with y. While the model is working, /sessions still opens the picker, and renaming and pinning work, but resuming, forking and deleting a session are refused until the turn finishes. For a resume or a fork, o4 shows Wait for the current turn to finish before resuming, forking or rewinding. For a delete, it closes the picker and shows Wait for the current turn to finish before making this change. /resume typed during a turn waits until the turn finishes. Because typed letters go into the filter, the lowercase a, r and p filter the list. The shortcuts are uppercase.

Resuming in a different directory

A session remembers the directory it started in. If you resume it from somewhere else, o4 asks where to run it:
  • the session’s directory
  • the current directory
  • always use the session’s directory
  • always use the current directory
The two “always” choices save your answer in ~/.o4/config.toml, and o4 stops asking:
Set cwd = "current" to always stay where you are. Delete the [resume] section to be asked again. If the session’s directory no longer exists, o4 offers only the current directory.

Where sessions are stored

Sessions are stored under ~/.o4, for every project: o4 names each session for you; see How sessions are named. Use /rename to choose your own name. Runs in print mode (o4 -p "...") aren’t saved as sessions.

List and delete sessions from the shell

o4 sessions list prints the sessions from the current checkout:
Each column is cut to fit, and long directories keep their end, such as …/code/api. The Updated time is in UTC. If the current checkout has no sessions but other directories do, o4 says how many exist elsewhere and suggests --all. Add --all to include sessions from every directory. Sessions saved by older o4 versions that didn’t record a directory only appear with --all. To delete a session, pass its ID:
You can also delete from the picker with A, then Delete….
Deleting a session removes it from the index, so it no longer appears in lists or the picker, along with its saved per-turn changes in the project’s .o4/turn-diffs/<id>. The session’s folder under ~/.o4/sessions/ stays on disk, and o4 sessions delete reports success even when the ID doesn’t exist. To remove the transcript completely, also delete ~/.o4/sessions/<id>.
o4 doesn’t delete old sessions on its own. Sessions stay until you delete them.

Fork a session

A fork is a copy of the conversation up to now that you can take in another direction. The original session is left as it is.
/fork <name> creates the fork, named <name>, and opens it in a new tab next to the current one, so you can switch between the two (see Session tabs). The fork also appears in the session picker. Each fork of a session needs its own name: reusing one fails with Fork failed: a fork named '<name>' already exists. If you type /fork while the agent is working, it waits until the turn finishes. You can’t fork while background tasks are running (Finish or stop background tasks before forking). /fork with no name opens the Forks switcher. It lists the session with its forks nested under it, with each one’s message count. The first row, + new fork from here, creates a fork with the next free name, such as fork-1. Press Enter on another session to switch to it, which works like /resume <id>. In the session picker, A then Fork copies the whole selected session. From o4 resume, o4 then resumes the copy. From /resume, the copy is added to the list and you stay where you are. To branch from an earlier turn instead of the latest one, use the Time Machine. See Undo and rewind.

Rename a session

/rename with no title puts /rename and the current title in the prompt box, so you can edit the title and press Enter. You can also press R in the session picker.

How sessions are named

When you send your first prompt, o4 uses its first line, up to 60 characters, as the session’s title. Once o4 has answered your first real request, it asks the model for a short name of one or two words, such as Retry limit, and uses that instead. Very short prompts (under three words or 12 characters), greetings such as hi, prompts that are only links or file paths, and bare slash commands don’t count as a real request; o4 waits for the next one. The name request is small and separate from the conversation: it sends only your first request and o4’s latest reply, at low reasoning, to your helper model if you set one, otherwise to the session’s own model. o4 names a session once. If the model’s reply is empty, more than two words or a refusal, o4 asks again later, three times at most, and otherwise keeps the first-line title. A name you set with /rename or R in the picker is never replaced. When you approve a plan, the session takes the plan’s title, unless you named the session yourself. Sessions from before o4 0.3.49 have their first line as their title. Resume one and send a request, and it gets a name too. A name you typed before 0.3.49 looks the same as a first-line title, so it’s replaced as well; /rename sets it again.

Export and copy the transcript

The export has a ## User, ## Assistant or ## Tool Result heading for each message, with a timestamp, followed by the complete message as a JSON block. It includes tool calls and their results, so you can see exactly what happened. /export overwrites an existing file and makes the file readable only by you. Copying uses pbcopy on macOS and wl-copy, xclip or xsel on Linux. If none of them works, for example over SSH, o4 sends the text to your terminal’s clipboard with an OSC 52 escape sequence, which most modern terminals support. Set O4_CLIPBOARD_OSC52=0 to turn that off.
An export contains everything in the conversation, including file contents and command output the agent saw. Check it before you share it.

Start over

/clear clears the conversation in the current session, so the model starts with no history. To start a new session instead, press Alt+N to open one in a new tab, or quit and run o4 again.

Sessions in tabs

Each tab is its own saved session, with its own history, and it shows up in the session picker like any other. Alt+N opens a new tab, Alt+W closes the current one, and Alt+J / Alt+K switch between them. A fork made with /fork <name> opens in a tab too. See Session tabs for all the keys. o4 remembers which tabs are open together, and their names. When you resume any one of them, the others open again as tabs behind it, each with its own model and reasoning level. To keep a tab from coming back with the others, close it with Alt+W before you quit.