codex doctor reports rollout_db_parity warning for valid paginated rollouts
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of Codex CLI is running?
codex-cli 0.151.0 (current npm release)
What subscription do you have?
ChatGPT — exact tier omitted because it is unrelated to this local diagnostic.
Which model were you using?
N/A — local codex doctor diagnostic.
What platform is your computer?
Darwin 25.6.0 arm64 arm
What terminal emulator and version are you using?
zsh invoked from the ChatGPT desktop app. TERM was explicitly set to xterm-256color.
Codex doctor report
{
"overallStatus": "warning",
"check": {
"id": "state.rollout_db_parity",
"status": "warning",
"summary": "rollout files and state DB thread inventory differ",
"activeFiles": 652,
"activeRows": 649,
"missingActiveRows": 3,
"duplicateRolloutThreadIds": 2,
"archiveMismatches": 0,
"duplicateDbPaths": 0,
"malformedFileNames": 0,
"staleRows": 0,
"scanErrors": 0
}
}
What issue are you seeing?
codex doctor --json reports a rollout/state-DB parity warning although the affected rollout files are valid paginated segments.
The mismatch consists of five rollout files belonging to two logical thread IDs. The state DB contains one current row per logical thread, while Doctor counts the additional paginated files as missing rows and duplicate rollout thread IDs.
Running codex migrate-rollouts --json --thread <redacted-thread-id> for both affected threads returns already_paginated for all five files.
All database integrity checks pass.
What steps can reproduce the bug?
- Have a thread whose history is stored in multiple paginated rollout files.
- Run:
TERM=xterm-256color env -u NO_COLOR codex doctor --json - Inspect the
state.rollout_db_paritycheck. - Run:
codex migrate-rollouts --json --thread <thread-id> - Observe that every affected file is reported as
already_paginated, while Doctor still reports missing rows and duplicate rollout thread IDs.
What is the expected behavior?
Valid paginated rollout segments should not be classified as missing state-DB rows or duplicate logical threads.
Alternatively, Doctor should clearly distinguish valid pagination from actual database drift and provide a supported repair instruction when repair is necessary.
Additional information
This is distinct from issues #31433 and #40426: those reports concern genuinely unindexed or restored rollout files. Here, all affected files belong to existing logical threads and are explicitly recognized as already_paginated.
No session transcripts or complete local paths are attached because they may contain sensitive information.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the state.rollout_db_parity check behind codex doctor --json, then compare how it interprets the paginated files reported by codex migrate-rollouts --json --thread. Done means valid paginated segments no longer produce missing-row or duplicate-thread warnings, while genuine database drift remains distinguishable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100