Skip to content

Commit d14074f

Browse files
authored
docs(orchestration-v2): Codex rollback uses thread/revert on paginated threads (pingdotgg#25705)
1 parent aa46f7a commit d14074f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎docs/orchestration-v2/feature-lifecycles.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ rollback.toRun(threadId, targetRunOrdinal)
410410
-> delete or mark stale later checkpoint refs
411411
```
412412

413-
Codex `thread/rollback` returns an authoritative provider thread snapshot. Other providers may require a synthetic provider thread restart from context.
413+
Codex `thread/revert` returns updated loaded thread metadata with an empty `turns` array; retained history must be hydrated through `thread/turns/list`. Other providers may require a synthetic provider thread restart from context.
414414

415415
Nested rollback:
416416

‎docs/orchestration-v2/thread-lineage-and-context-transfer.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ This hook checks pending context transfers targeting the thread/run and chooses
227227

228228
Provider adapters own native details. The orchestrator owns the relationship, source point, durable transfer record, and command receipts.
229229

230-
For Codex, native `thread/fork` accepts an inclusive `lastTurnId` boundary. When the app source point is a completed provider turn with a native turn reference, the Codex adapter passes that native id so the provider creates the fork at the requested point directly. This is the only viable path on paginated Codex threads, which reject `thread/rollback`. If no native turn reference is available, the adapter falls back to forking the latest native state and rolling back the fork by the number of later terminal provider turns — and reports an explicit failure when the forked thread uses paginated history, since that fallback cannot be honored there. The orchestrator still passes a provider-neutral source point and source provider-turn history; it does not encode Codex boundary or rollback policy.
230+
For Codex, native `thread/fork` accepts an inclusive `lastTurnId` boundary. When the app source point is a completed provider turn with a native turn reference, the Codex adapter passes that native id so the provider creates the fork at the requested point directly. If no native turn reference is available, the adapter falls back to forking the latest native state and rolling back the fork by the number of later terminal provider turns, using `thread/revert` on paginated history and reporting an explicit failure on legacy history, which Codex 0.156 cannot revert. The orchestrator still passes a provider-neutral source point and source provider-turn history; it does not encode Codex boundary or rollback policy.
231231

232-
The same paginated-history constraint applies to direct checkpoint rollback: `thread/rollback` only works on legacy-history Codex threads. The V2 adapter probes `historyMode` before rolling back and fails explicitly on paginated threads rather than sending a request Codex will reject. The paginated equivalent (page `thread/turns/list` to find the first removed turn, then `thread/revert` with `beforeTurnId`) is not implemented yet.
232+
Direct checkpoint rollback also requires paginated Codex history. The V2 adapter checks `historyMode` before rolling back and fails explicitly on legacy history, which Codex 0.156 cannot revert. On paginated history, it pages `thread/turns/list` to find the first removed turn, then sends `thread/revert` with `beforeTurnId`.
233233

234234
## Data Ownership
235235

0 commit comments

Comments
 (0)