Skip to content

[Bug]: Codex paginated thread revert fails after restoring workspace files #8958

Description

@LunarRed

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Open an existing Codex thread that uses paginated history.
  2. Choose an earlier user message.
  3. Click the action to revert to that point.
  4. Confirm the revert.

Expected behavior

T3 Code should restore both the workspace and the Codex conversation to the selected point.

If Codex cannot rewind this type of thread, T3 Code should stop before changing any files and explain that the revert is unavailable.

Actual behavior

T3 Code reports this error:

Provider adapter request failed (codex) for thread/rollback: paginated threads do not support thread/rollback

The revert can fail after T3 Code has restored the workspace checkpoint. The files may move back to the selected point while the Codex conversation remains unchanged.

In CheckpointReactor.handleRevertRequested, checkpointStore.restoreCheckpoint runs before providerService.rollbackConversation. When Codex rejects thread/rollback, the operation stops after the file change.

Impact

Major degradation or frequent failure

A failed revert can leave the workspace and conversation at different points. The user may continue the thread without realizing that the files have already changed.

Version or commit

T3 Code Nightly 0.0.38-nightly.20260831.1240

Environment

macOS 26.5.2, T3 Code desktop nightly, Codex CLI 0.151.0

Logs or stack traces

Provider adapter request failed (codex) for thread/rollback: paginated threads do not support thread/rollback

Workaround

No in-app workaround found. Check the Git diff after the failure before continuing the thread.

Activity

  1. Luzivog commented on Sep 5, 2026

    @Luzivog

    Confirming the same error on Linux with a headless T3 server:

    • T3: 0.0.39-nightly.20260905.1285
    • Codex CLI: 0.153.4
    • Action: go back to an earlier message in an existing Codex conversation.
    Provider adapter request failed (codex) for thread/rollback: paginated threads do not support thread/rollback
    

    Inspection of the installed T3 bundle and its source map confirms that CodexSessionRuntime.rollbackThread still calls thread/rollback unconditionally. The staged 0.0.39-nightly.20260905.1286 bundle contains the same call; that candidate was inspected, not tested through the UI.

    A possible implementation lead: the experimental protocol schema generated directly from Codex 0.153.4 exposes:

    // Replace paginated history with the prefix before this turn.
    thread/revert({ threadId, beforeTurnId })

    beforeTurnId excludes that turn and every later turn. The response's thread.turns is always empty; retained history must be loaded through thread/turns/list. The schema explicitly says this operation changes persisted conversation history only, not local files. This needs turn-boundary mapping and history hydration, rather than simply renaming the rollback request. We have not exercised this replacement operation end to end.

    The installed CheckpointReactor.handleRevertRequested also restores the filesystem before requesting conversation rollback, as described in this issue. We have not established whether files were actually changed in our failed attempt.

    Related work: #9069 addresses workspace recovery when provider rollback fails. #9169 addresses the same unsupported operation in the retry/edit fork path using thread/fork.lastTurnId; its scope differs from this in-place checkpoint revert.

    Useful regression coverage would include a paginated thread reopened before reverting, agreement between retained messages and restored files after success, continuation after restart, and a provider rejection that preserves pre-attempt files, including uncommitted edits.

    Investigation and comment prepared with Codex.

  2. juliusmarminge commented on Sep 12, 2026

    @juliusmarminge
    Member

    Fixed by #11338 (merged to main) — rewind uses Codex's paginated thread/revert API so paginated threads no longer fail after workspace restore with paginated threads do not support thread/rollback.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions