Skip to content

Expose thread/read and thread/list as MCP tools for tool-only clients #13641

Closed as not planned

Description

@Pragy-Vashistha

What variant of Codex are you using?

CLI (MCP server mode via codex mcp)

What feature would you like to see?

What version of the Codex App are you using?
CLI 0.100.0

What subscription do you have?
Pro

What platform is your computer?
macOS (Apple Silicon M2)

What issue are you seeing?
The App Server internally supports thread/read and thread/list, but these are not
exposed on the MCP tool surface. Clients that interact via tools/list + tools/call
have no read-only access to threads - only codex (create) and codex-reply (write).

Expected:
MCP tool-only clients should be able to read thread history and list existing threads
without writing to them.

Actual:
The only way to interact with a thread via MCP is to post a new message (codex-reply).
There is no way to inspect thread state, recover context after a client restart, or
discover existing threads without manually tracking threadIds.

Impact:

  • If a client loses a threadId or restarts mid-session, the entire conversation context is
    lost - forcing a costly cold start to rebuild in a new thread.
  • Recovering context requires posting a "what did we discuss?" message, which pollutes the
    thread.
  • No way to make pre-flight decisions (resume vs fork vs new) based on thread recency,
    archived state, or token usage.
  • Cross-client continuity is broken - a thread touched by CLI, IDE, and MCP client has no
    shared read path for tool-only clients.

Related: #6168, #5660, #3712, PR #9192.

What steps can reproduce the bug?
Steps to reproduce:

  1. Start Codex as an MCP server.
  2. Use codex tool to create a thread - save the returned threadId.
  3. Use codex-reply to have a multi-turn conversation.
  4. Simulate a client restart (lose local state but retain the threadId).
  5. Attempt to read the thread history without posting a new message.
  6. Observe that no read-only tool exists - tools/list only shows codex and
    codex-reply.

What is the expected behavior?
tools/list should include read-only thread tools:

  • codex-thread-read(threadId, includeTurns?, cursor?) - returns thread metadata +
    paginated turn history without side effects.
  • codex-thread-list(limit?, cursor?, archived?, cwd?) - returns list of threads with
    metadata for discovery and resume decisions.

Both should return stable machine-readable structuredContent + human summary in
content, with cursor-based pagination for long threads.

Additional information

  • The App Server already has these capabilities internally - this is a request for
    tool-surface parity for MCP clients.
    • Heavy MCP users who maintain long-running threads across sessions need context recovery,
      thread discovery, and informed resume decisions - all without writing to the thread.
    • Acceptance criteria: (1) tools/list includes both tools, (2) cursor-based pagination,
      (3) no write side effects, (4) stable structuredContent format.

Activity

  1. added
    CLIIssues related to the Codex CLI
    mcpIssues related to the use of model context protocol (MCP) servers
    mcp-serverIssues related to the use of the `codex mcp-server` subcommand
    on Mar 5, 2026
  2. github-actions commented on Mar 5, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. removed
    CLIIssues related to the Codex CLI
    mcpIssues related to the use of model context protocol (MCP) servers
    on Mar 5, 2026
  4. TimesAndPlaces commented on Mar 17, 2026

    @TimesAndPlaces

    Opened #14923 for the app-side counterpart to this. The desktop app already sits on top of thread lifecycle primitives, but there is still no explicitly gated cross-thread orchestration surface for durable peer threads. Exposing thread/read and thread/list on MCP looks like the minimum read-side foundation for that broader orchestration model.

  5. etraut-openai commented on Mar 17, 2026

    @etraut-openai
    Contributor

    The app server is our main investment area for extensibility. It's likely that we're going to deprecate and eventually remove support for the mcp_server, so this isn't an area we plan to invest in.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmcp-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