Skip to content

Add rollout-path parameter to codex tool for session resume #8614

@tiann

Description

@tiann

What feature would you like to see?

Add rollout-path parameter to codex tool for session resume, This enables MCP clients to maintain session continuity across restarts or reconnections, preserving conversation history and context.

Current Behavior

The MCP server's codex tool only supports starting new sessions. There is no way to resume a previous session from a rollout file.

While ConversationManager in codex-core already has resume_conversation_from_rollout() capability, this functionality is not exposed through the MCP server interface.

Proposed Enhancement

Add an optional rollout-path parameter to the codex tool that allows resuming a session from a previously saved rollout file.

{
"prompt": "Continue working on...",
"rollout-path": "~/.codex/sessions/2025/01/02/rollout-xxx.jsonl"
}

When rollout-path is provided, the session should be restored from the rollout file instead of starting fresh.

Use Case

This enables MCP clients to maintain session continuity across restarts or reconnections, preserving conversation history and context.

Related Code

  • ConversationManager::resume_conversation_from_rollout() - existing resume logic in codex-core
  • RolloutRecorder::get_rollout_history() - rollout file parsing

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmcpIssues related to the use of model context protocol (MCP) serversmcp-serverIssues related to the use of the `codex mcp-server` subcommand

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions