openai / openai/codex

migrate-rollouts cannot recover an active rollout missing its state metadata

Open
#41,814 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI session
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Summary

Codex detects active rollout files absent from the local state database, but codex migrate-rollouts --apply refuses to recover them because their SQLite metadata is missing.

Environment

  • macOS on Apple Silicon
  • Codex CLI 0.151.0
  • Codex Desktop 26.825.41651
  • ChatGPT authentication

Observed

codex doctor reports healthy state and thread-history databases plus two active rollout files missing state-DB rows. For either affected thread, the supported recovery command fails closed with:

thread-store internal error: rollout migration failed: thread <redacted> is missing its SQLite metadata

The raw rollout file remains present and unchanged; no direct SQLite repair was attempted. In contrast, the same native migration successfully rebuilt paginated history for 2,228 other active rollouts.

Expected

A supported recovery path should either reconstruct minimal metadata from a valid rollout or explicitly provide a safe, reversible metadata-rebuild operation. The current migration requires the missing record it is meant to repair.

Why this matters

This leaves local sessions present on disk but unable to enter the paginated-history path, contributing to stale/partial history display after resume or Desktop reconnect. This appears related to the broader projection-stall class discussed in #41079, but the immediate failure here is missing state metadata.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the codex migrate-rollouts --apply entry point and trace the thread-store migration failure for rollouts missing SQLite metadata. Compare this path with the successful migration of other active rollouts, then define done as a supported recovery or explicitly safe, reversible metadata rebuild with regression coverage for the missing-row case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sqlite
Domain
cli, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.