Skip to content

Paginated history can reconstruct completed turns as “interrupted” on resume #37577

Description

@pivot526

Summary

After upgrading Codex CLI from 0.146.0 to 0.147.0, previously completed conversations no longer replay correctly with codex resume.

The resumed conversation shows only the beginning of the first turn and then:

Conversation interrupted - tell the model what to do differently. Something went wrong? Hit `/feedback` to report the issue.

However, the underlying rollout JSONL is complete and contains the full turn, including subsequent assistant/tool activity and an explicit task_complete.

This appears to be a bug in paginated history reconstruction rather than missing or corrupted rollout data.

Environment

  • Codex CLI: 0.147.0
  • Previously: 0.146.0
  • OS: Linux
  • Installation: native Codex install script

Reproduction

  1. Have an existing conversation containing one or more normally completed turns.
  2. Upgrade to 0.147.0.
  3. Resume the conversation with:
codex resume
  1. The TUI displays only the beginning of the conversation and then marks it as interrupted.

Evidence

The underlying rollout JSONL remains intact.

For the affected turn, the rollout contains:

task_started
...
assistant/tool activity
...
final assistant output
task_complete

There are also later completed turns in the same rollout.

I queried codex app-server directly using thread/resume with paginated history. The app-server returned the affected historical turn approximately as:

thread status: idle
history mode: paginated

turn status: interrupted
items: 4

This is inconsistent with the canonical rollout, where the same turn continues substantially further and ends with task_complete.

Using excludeTurns: false did not restore the full history; the thread was still returned in paginated mode with the same truncated/interrupted reconstruction.

Troubleshooting attempted

I tried:

  • downgrading to 0.146.0;
  • deleting and rebuilding the Codex SQLite state database;
  • restarting Codex and resuming the same conversation.

The problem remained.

The rollout JSONL itself remained complete.

Suspected failure mode

It appears that paginated history reconstruction is materialising only a partial fragment of a completed turn.

Because the completion boundary is not included in the reconstructed fragment, the turn is subsequently treated as interrupted even though the rollout contains a valid task_complete.

Conceptually:

complete rollout
    ↓
paginated history reconstruction
    ↓
partial historical turn
    ↓
completion boundary not observed
    ↓
turn classified as interrupted
    ↓
TUI displays “Conversation interrupted”

The incorrect interrupted status is already present in the thread/resume app-server response, so the problem does not appear to be limited to TUI rendering.

Expected behaviour

Completed historical turns should be reconstructed as completed and their full conversation history should remain available after resume.

Actual behaviour

A completed historical turn is returned as interrupted with only a small subset of its items, and later history is not displayed.

Data integrity

The underlying rollout data appears to be intact. This looks like a paginated history reconstruction/migration issue rather than conversation data loss.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions