Skip to content

Conversation

@pap-openai
Copy link
Contributor

@pap-openai pap-openai commented Jan 9, 2026

Session renaming:

  • /rename my_session
  • /rename without arg and passing an argument in customViewPrompt
  • AppExitInfo shows resume hint using the session name if set instead of uuid, defaults to uuid if not set
  • Names are stored in CODEX_HOME/sessions.jsonl

Session resuming:

  • codex resume lookup for CODEX_HOME/sessions.jsonl first entry matching the name and resumes the session

Copy link
Contributor

@JaviSoto JaviSoto left a comment

Choose a reason for hiding this comment

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

Looks good!!

Random suggestion I just thought of: it could be useful to give the agent a way to set the name as well via a tool call, so you can tell the agent to name the conversation as well? (you could even add something to your AGENTS.md with instructions on how you want the agent to name your sessions, or to rename them in certain cases etc)

#[derive(Debug, Parser)]
struct ResumeCommand {
/// Conversation/session id (UUID). When provided, resumes this session.
/// Conversation/session id (UUID) or session name. UUIDs take precedence if it parses.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

pub struct SessionMetaUpdatedEvent {
/// Name left as session_id instead of thread_id for backwards compatibility.
pub session_id: ThreadId,
#[serde(default, skip_serializing_if = "Option::is_none")]
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

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

I would def go to the index file

  • can we try to use thread instead of session as much as possible

Ok(())
}

async fn rewrite_session_name(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Those functions should not be needed. We should use the same mechanism as for the model used during the rollout for example

@pap-openai
Copy link
Contributor Author

@jif-oai @JaviSoto moved to an index file instead of SessionMeta so we don't touch rollout files. We're reading a CODEX_HOME/session_index.jsonl from most recent renames to oldest. We're appending new names even if previous session had a name to avoid searching for the entry with name + rewriting file and keep write O(1).

Implemented your comments (adding tests on resume, move to thread, thread_name or thread_id naming)

@pap-openai pap-openai requested a review from jif-oai January 13, 2026 01:31
@pap-openai pap-openai changed the title WIP: Conversation naming Conversation naming Jan 13, 2026
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants