State runtime migration failure causes existing conversation to appear truncated after restart (26.616.81150) Feedback Id: 019ebd3f-d74a-7f13-8357-76aad072ee5f

Resolved 💬 3 comments Opened Jun 25, 2026 by raspi-user Closed Jun 26, 2026

What version of the Codex App are you using (From “About Codex” dialog)?

26.616.81150 (Build 4306)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin Mac.home 25.5.0 Darwin Kernel Version 25.5.0: Mon Apr 27 20:41:15 PDT 2026; root:xnu-12377.121.6~2/RELEASE_ARM64_T6041 arm64

What issue are you seeing?

After restarting Codex Desktop, an existing long-running conversation appears truncated.

The conversation is still listed in the sidebar, but only the most recent two tickets/messages are displayed, whereas I expected the earlier conversation history to remain accessible.

The issue did not occur immediately after updating. It first became visible after restarting the application.

The runtime log reports:

failed to initialize state runtime at ~/.codex:
migration 2 was previously applied but is missing in the resolved migrations

followed by repeated:

state db discrepancy during find_thread_path_by_id_str_in_subdir: falling_back

The local Codex data still appears to exist.

Examples:

• ~/.codex is approximately 30 GB
• approximately 291 session JSONL files still exist
• state_5.sqlite exists
• logs_2.sqlite exists

This suggests the underlying conversation data has not been deleted and that the application is falling back instead of successfully initializing the existing state database.

What steps can reproduce the bug?

  1. Install Codex Desktop 26.616.81150.
  2. Open and use an existing long-running conversation.
  3. Leave the application running.
  4. Restart the desktop application.
  5. Open the existing conversation.

Observed result:

The conversation remains visible in the sidebar but only the most recent 2 tickets/messages are displayed out of 278 tickets that should be displayed.

The runtime log reports:

migration 2 was previously applied but is missing in the resolved migrations

followed by repeated state db discrepancy ... falling_back messages.

What is the expected behavior?

The desktop application should successfully initialize the existing local state database and display the complete existing conversation history after restarting.

Existing conversations should not appear truncated when the underlying local session data is still present.

Additional information

I have already submitted in-app feedback.

Feedback ID:

019ebd3f-d74a-7f13-8357-76aad072ee5f

I intentionally did not modify or repair the local state database after observing the problem.

I created a complete backup of the local Codex environment before making any changes.

As additional context, I recall seeing a different history/sidebar issue approximately three months ago, where older conversations temporarily disappeared from the sidebar until a subsequent desktop release resolved the problem. I cannot confirm whether it is related, but I mention it in case it helps identify a regression in the history/state management code.

<img width="1448" height="1086" alt="Image" src="https://github.com/user-attachments/assets/9ade077b-eee9-40e5-bdf6-377bc65922e9" />

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗