[Windows][Desktop 26.908.4834.0] Compaction rewrote three rollouts and history projection left 13 threads unindexed
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Microsoft Store package OpenAI.Codex_26.908.4834.0_x64; bundled codex-cli 0.154.0-alpha.6.2.
What subscription do you have?
Not included in the local diagnostic evidence; I can provide it if required.
What platform is your computer?
Windows x64, OS build 26100.
What issue are you seeing?
Summary
Three long-running Windows Codex Desktop threads now begin at a compacted snapshot rather than their original transcript. Earlier assistant messages are absent from the current rollout files, while retained user/developer inputs survive inside replacement_history with one encrypted compaction item. Two rollout files were recreated on September 9 even though their filenames encode August session starts.
The same investigation found a second failure: 13 threads still had completed message events in their rollout JSONL but had no projected history items. Rebuilding the SQLite projection restored 209 later message items, but it could not recover assistant messages absent from the three rewritten rollouts.
This closely matches #44363. I am filing a separate case because this provides three Windows examples, exact before-repair comparison, full source/index parity checks, and evidence that destructive compaction and projection migration are separate layers of the failure.
Environment
- Windows x64, build 26100
- Microsoft Store package:
OpenAI.Codex_26.908.4834.0_x64 - Bundled
codex-cli:0.154.0-alpha.6.2 - Affected rollouts record CLI versions
0.146.0-alpha.9.2and0.147.0-alpha.6.6 - Same account throughout; no task deletion, account switch, or project-directory move
- All three affected records use paginated history and originated as delegated/subagent tasks
Sanitized rollout evidence
Each rollout starts with session_meta, immediately followed by one compacted record. There are no ordinary messages before that record. Its message field is empty.
| Thread | Current size | Filename start | Windows creation time | replacement_history |
Top-level assistant messages remaining |
|---|---|---|---|---|---|
| A | 3,578,844 bytes | Aug 4 | Sep 9 | 81 user, 3 developer, 1 encrypted compaction | 15 |
| B | 1,966,274 bytes | Aug 3 | Sep 9 | 132 user, 3 developer, 1 encrypted compaction | 22 |
| C | 1,784,535 bytes | Aug 15 | Sep 13 | 78 user, 3 developer, 1 encrypted compaction | 20 |
The initial compacted records are byte-identical to a backup created before the local history repair. The repair did not edit any rollout. This rules out the repair as the writer of those snapshots.
For comparison, two other long-running local threads also contain compaction events but retain 91 and 54 indexed messages before their first compaction marker, and their complete visible history remains scrollable. Compaction by itself therefore does not require the UI transcript to begin at the compaction marker.
Secondary history-projection failure
- 13 threads had completed source message events but zero corresponding history items.
- After backing up the databases and rollouts, rebuilding the projection restored 209 message items.
- SQLite
quick_checkpasses for the state and history databases. - A post-repair source/index audit found no missing source message events or orphan history items across 55 ordinary threads.
- Complete
thread/turns/listpagination succeeded for 53 content-bearing threads. - Reindexing only restored messages that still existed in the rollout; it did not recreate missing pre-compaction assistant turns.
Recovery sources checked
No predecessor rollout or earlier assistant transcript was found in active sessions, archived sessions, Codex browser/cache storage, Windows package storage, app logs, temporary files, Recycle Bin, older state databases, or local backups. Windows File History was not configured. An elevated vssadmin, Win32_ShadowCopy, and restore-point check returned no snapshots.
Suspected sequence
The evidence is consistent with this sequence:
- A compaction/local-thread-store path recreated the durable rollout using only a compacted working window.
- Earlier assistant records were discarded while selected user/developer inputs survived in
replacement_history. - Paginated-history migration or projection then processed the already-rewritten rollout and left some threads unindexed.
- Rebuilding the projection restored only the source records that remained.
This is an inference from local artifacts. Without pre-rewrite Windows files or server-side write logs, I cannot identify the exact writer.
What steps can reproduce the bug?
I do not have a safe deterministic reproduction. Conditions shared by the affected threads:
- Use a long-running delegated/subagent task across many turns.
- Allow multiple context compactions.
- Update/restart Codex Desktop during the legacy-to-paginated history transition.
- Reopen the task and observe that history stops at “Context automatically compacted.”
- Inspect the rollout and observe
session_metafollowed immediately by a single compacted snapshot.
What is the expected behavior?
Context compaction should reduce model-visible context without deleting the durable user-visible transcript. An update or history migration should preserve every existing rollout and rebuild projections from the start. If recovery is impossible, the app should show an explicit error and retain a pre-rewrite backup.
Additional information
I can provide private thread/window IDs, sanitized diagnostics, file hashes, and the support case reference to an OpenAI maintainer. I am intentionally not publishing conversation text, task names, local paths, credentials, raw rollouts, or database files.
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 with the compaction/local-thread-store path and the paginated-history migration that write rollout JSONL and the SQLite state and history databases. Compare the affected rollout records with the retained examples and inspect how projections are rebuilt from source events. Done means durable transcripts remain intact across compaction and migration, missing history is indexed, and an unsafe rewrite preserves a recoverable backup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sqlite
- Domain
- database, desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100