Skip to content

Conversation

@jif-oai
Copy link
Collaborator

@jif-oai jif-oai commented Nov 20, 2025

When you are in a session you can now run. If the name already exists, we simply override the name assignment (we do not touch the former session content)

/save hello_world

This will save the session with a human readable name. You can use this name to resume (as previously):

codex resume hello_world

Or to fork it. A fork will create a clone of the entire session at the time when the fork happen. The typical use case is for example asking the model "Explore codex-core". Save it as "core" and then fork from it for the different tasks for the day.

codex fork hello_world

A fork is just a new session so it supports everything as expected (e.g. you can save a fork into a new name if you want)

Another use-case is just to make it easier to pause a task and come back to it later. No need to remember the session ID

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +132 to +143
pub async fn resolve_rollout_path(codex_home: &Path, identifier: &str) -> Result<Option<PathBuf>> {
if let Some(entry) = resolve_saved_session(codex_home, identifier).await? {
if entry.rollout_path.exists() {
return Ok(Some(entry.rollout_path));
}
warn!(
"saved session '{}' points to missing rollout at {}",
identifier,
entry.rollout_path.display()
);
}
Ok(find_conversation_path_by_id_str(codex_home, identifier).await?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Keep saved sessions usable after archive

If a user saves a session and then closes it, the app server’s archive path moves the rollout into ARCHIVED_SESSIONS_SUBDIR (codex-rs/app-server/src/codex_message_processor.rs lines 2264-2273). When the user later runs codex resume some-name or forks from that saved name, this helper first checks the stored path and then falls back to find_conversation_path_by_id_str. The stored path no longer exists post-archive, and find_conversation_path_by_id_str only searches ~/.codex/sessions (codex-rs/core/src/rollout/list.rs lines 559-590), so we always return None. That means every saved session becomes impossible to resume once the conversation is archived, effectively breaking the new feature. Please make this resolve look in the archived directory (or otherwise keep stored paths valid) so saved sessions remain usable.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants