Skip to content

app-server websocket shared-thread turns complete but rollout never materializes, so sibling thread/resume fails with "no rollout found" #16872

@decleezy

Description

@decleezy

What issue are you seeing?

On codex-cli 0.117.0, a shared websocket codex app-server can run a real user turn to completion, but
the rollout file is never materialized on disk.

As a result:

  • thread/read with includeTurns: false works
  • thread/read with includeTurns: true fails
  • sibling thread/resume fails with no rollout found for thread id ...

Environment

  • Codex CLI: 0.117.0
  • Release tag: rust-v0.117.0
  • Release commit: 4c70bff480af37b1bf1a9b352b8341060fe55755
  • Transport: websocket app-server
  • Launch:
    • codex app-server --listen ws://127.0.0.1:9891

What steps can reproduce the bug?

Repro

  1. Start a shared websocket app-server.
  2. Client A connects and calls initialize.
  3. Client A calls thread/start.
  4. Client A calls turn/start with:
    {
      "threadId": "<thread-id>",
      "input": [
        {
          "type": "text",
          "text": "Please reply with exactly the word materialized.",
          "text_elements": []
        }
      ]
    }
    
  5. Wait for:
    • item/started for userMessage
    • item/completed for userMessage
    • assistant reply
    • turn/completed
  6. On the same client, call:
    • thread/read with includeTurns: false
    • thread/read with includeTurns: true
  7. On sibling Client B, call:
    • thread/resume for the same thread id
  8. Check the rollout path returned by the thread APIs.

What is the expected behavior?

Expected behavior

After the first real user turn completes on a non-ephemeral shared thread:

  • rollout file should exist at the advertised path
  • thread/read(includeTurns: true) should succeed
  • sibling thread/resume should succeed

Actual behavior

The turn fully runs, but no rollout file is created.

Observed repro thread:

  • thread id:
    • 019d5fe8-3730-7dc0-b126-bd5bd37446bd
  • advertised rollout path:
    • /Users/.../.codex/sessions/2026/04/05/rollout-2026-04-05T18-09-07-019d5fe8-3730-7dc0-b126-
      bd5bd37446bd.jsonl

After turn/completed:

  • thread/read(includeTurns: false) succeeds
  • thread/read(includeTurns: true) returns:
    • thread 019d5fe8-3730-7dc0-b126-bd5bd37446bd is not materialized yet; includeTurns is unavailable
      before first user message
  • sibling thread/resume returns:
    • no rollout found for thread id 019d5fe8-3730-7dc0-b126-bd5bd37446bd
  • the rollout file does not exist on disk at the advertised path

Waiting a few more seconds does not change the outcome.

Additional information

Notes

This seems to specifically affect shared-thread / multi-client websocket usage.

Lightweight thread state is visible across clients, but rollout-backed operations never become available
because the rollout is never materialized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    app-serverIssues involving app server protocol or interfacesbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions