Repository navigation
Paginated history projector rejects legacy duration objects with invalid type: map, expected f64 #41276
Description
What version of Codex is running?
- Affected rollouts were written by Codex Desktop / CLI
0.146.1 - The incompatibility was observed after opening the same paginated threads with a newer Desktop app-server (
0.149.1) - Current installed CLI used for diagnostics:
codex-cli 0.150.1
What platform is your computer?
Ubuntu 22.04.5 LTS, Linux 6.8.0, x86_64.
What issue are you seeing?
Long-running local conversations created by an older Codex process disappear completely or become truncated in the Desktop GUI even though the durable rollout JSONL still contains the full transcript.
The paginated history projector repeatedly logs:
skipping rejected rollout line while projecting "<redacted rollout path>":
invalid type: map, expected f64 at line 1 column <varies>
The rejected records contain command-execution duration values serialized by the older writer as a Rust-style duration object:
"duration":{"secs":0,"nanos":137321817}The newer projector appears to deserialize the same field as a floating-point number, equivalent to:
"duration":0.137321817Because projection stops/rejects these otherwise valid records, the GUI does not show conversation turns that are still present on disk. This can look like chat history loss even though the source rollout is intact.
In one sanitized local repair batch, 11 rollout files contained 723 values in the legacy {"secs": ..., "nanos": ...} representation. The affected thread metadata used history_mode = "paginated".
What steps can reproduce the bug?
- Use Codex Desktop / CLI
0.146.1to create or continue a paginated conversation that runs local commands. - Ensure the rollout contains a completed command item whose
durationis serialized as:{"secs":3,"nanos":72761183} - Upgrade to a newer Codex Desktop/app-server version whose history projection schema expects
durationto be anf64. - Reopen the old conversation or trigger history projection.
- Observe repeated
invalid type: map, expected f64errors. - Observe that the GUI history is missing or stops before the rejected records even though the rollout JSONL remains complete.
What is the expected behavior?
Paginated history projection should remain backward compatible with rollout records written by supported older Codex versions.
The duration deserializer should accept both:
{"secs":3,"nanos":72761183}and:
3.072761183Alternatively, a nonessential duration field should be normalized or omitted without rejecting the complete history item or preventing later turns from appearing.
What is the actual behavior?
The projector rejects affected rollout lines with:
invalid type: map, expected f64
The source transcript remains on disk, but the Desktop conversation pane does not materialize it correctly.
Local validation and workaround
Before repair, the rollout files and SQLite databases were backed up. The local workaround was:
- Stop old writers.
- Convert each duration map using:
seconds = secs + nanos / 1_000_000_000 - Reset/rebuild the affected paginated history projections.
- Restart the Desktop app-server.
After conversion, the conversations became visible again.
Post-repair validation:
PRAGMA integrity_check: ok
projected turns: 930
projected items: 9374
invalid item_json rows: 0
This indicates that the durable conversation data and SQLite structure were healthy; the incompatible duration representation was the projection blocker.
Suggested fix
- Use a backward-compatible/untagged duration deserializer accepting both numeric seconds and
{secs, nanos}. - Normalize legacy duration values during projection without rewriting the source rollout.
- Continue projecting when a nonessential telemetry/timing field is incompatible.
- Add a regression fixture containing a
0.146.1command-execution record. - Consider a supported history projection repair/rebuild command so users do not need to edit SQLite or rollout JSONL manually.
Related issues
- [Bug] Paginated thread history projection stops at a token_count record #40342 — paginated projection stops at a different record type (
token_count) - Resume opens a long thread at its first turn: 0.146.1 desynced thread_history projection cursors, and later versions never repair them #38792 — older projection cursor desynchronization is not automatically repaired
- Paginated history drops valid flattened rollout records and reuses ordinals #35746 — inconsistent paginated rollout decoding paths
This report does not include the original database or rollout files because they contain private conversation and command output. Thread IDs, local usernames, absolute paths, request IDs, and conversation text have been removed.
Activity
github-actions commentedon Aug 28, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
UtopistList commentedon Aug 31, 2026
Independent reproduction on a Linux Remote Control host.
Environment
Observed behavior
A long-running task continues executing and appending to its canonical rollout after the controlling laptop disconnects, but Codex Desktop and mobile both rehydrate only an early prefix of the same task. The task remains reported as active.
This is apparent history loss, not actual rollout loss.
The app-server repeatedly logs:
skipping rejected rollout line while projecting ".jsonl":
invalid type: map, expected f64
followed by:
thread history projection ... expected ordinal 18, got 19
The first rejected completed command item contains:
"duration":{"secs":0,"nanos":15504}
A streaming validation of the canonical JSONL found valid JSON and a strictly contiguous ordinal sequence. Meanwhile, thread_history_1.sqlite remained at next_rollout_ordinal = 18, and cross-device thread/read returned only the initial user message and first assistant update. The rollout continued growing after the laptop disconnected.
The identical projector warning appears across multiple command-bearing tasks on this host beginning on 2026-08-22. Earlier phone/Desktop continuation tests had passed, indicating a regression across the history-format/update boundary rather than a pairing or service-management failure.
Expected behavior
codex history repaircommand.No live rollout or SQLite data has been rewritten. The original state is preserved for an official backward-compatible fix or supported repair path. (reported by Chat GPT)
Chen-qwq commentedon Sep 7, 2026
Independent Windows repro, plus a successful local reindex test:
10.0.26200), Codex Desktop MSIX26.901.6511.0, bundled app-server/CLI0.146.0-alpha.3.1.next_rollout_ordinal = 17, with only 1 projected turn and 4 projected items, even though the original rollout JSONL files were complete. The SQLite databases passedPRAGMA quick_check.invalid type: map, expected f64and thenexpected ordinal 17, got 18.durationobjects to numbers is not a safe workaround: the resume path and history projection path currently expect incompatible duration representations. I rolled that experiment back completely.@openai/codex@0.153.4app-server once against the unchanged rollout. It rebuilt the projection to ordinal 724: 15 turns and 245 items, withPRAGMA quick_check = ok.0.153.4, the Desktop-bundled0.146.0-alpha.3.1app-server could read all 15 rebuilt turns viathread/turns/list. The original rollout SHA-256 remained unchanged, and I restored the thread's original archived state.This strongly suggests that the skip-and-advance behavior from #42369 / commit 095ac4f fixes the stalled projection when used to rebuild it, but the current Windows Desktop bundle still ships the older projector and does not automatically repair already-stalled rows.
Could Desktop bundle the newer projector and/or expose a supported per-thread reindex/repair action? This is the same visible symptom as #42662.
jhaspinelli17-web commentedon Sep 10, 2026
I can reproduce this on Windows 11 build 26200 with the Microsoft Store Codex app 26.903.9818.0 and bundled codex-cli 0.145.0.
Additional trigger/context in this case:
read_threadAPI still returned stored messages.page.hasMore: false, so the blank transcript is not limited to reopening a long paginated task.Both affected rollouts contain duration objects in the form described in this issue. A read-only scan found:
Example from the newly created task (identifiers and paths removed):
The local log repeatedly emits the exact errors below for both the old task and the newly created task:
Observable impact: the sidebar entry and active task continue to exist, the model can keep working, and
read_threadcan retrieve the user/assistant items, but the Windows app transcript pane is blank. Restarting the app and forcing navigation to the task did not restore rendering.No transcript or database is attached because it contains private project content. A local backup was made before further troubleshooting.