Codex Desktop App 26.609.30741 (0.140.0-alpha.2): local sessions disappear after update until renderer cache is cleared

Resolved 💬 5 comments Opened Jun 12, 2026 by MumuTW Closed Jun 12, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Description
After Codex Desktop App auto-updated to 26.609.30741 (bundled codex-cli 0.140.0-alpha.2), all previous local sessions disappeared from the sidebar. The session files are still present on disk.

Environment

  • Codex Desktop App: 26.609.30741 (CFBundleVersion 3808)
  • Bundled codex-cli: 0.140.0-alpha.2
  • OS: macOS 26.5.1 (Apple Silicon)
  • Auth: ChatGPT login

Observed behavior

  • Sidebar shows no previous sessions after update.
  • ~/.codex/sessions/ still contains 101 rollout JSONL files.
  • ~/.codex/state_5.sqlite still contains 643 thread rows (85 unarchived, 558 archived).
  • Rebuilding ~/.codex/session_index.jsonl from state_5.sqlite and restarting the app does not restore the sessions.
  • Switching model_provider back to openai and restarting does not restore the sessions.
  • App logs show: failed to refresh available models: unexpected status 403 Forbidden: ... Missing scopes: api.model.read ... url: https://api.openai.com/v1/models?client_version=0.140.0

Workaround that restored the sessions
Clearing the Desktop App's renderer cache and restarting restored the sidebar history:

rm -rf ~/Library/Caches/Codex \
       ~/Library/Caches/com.openai.codex \
       ~/Library/Application\ Support/Codex/Default/Cache \
       ~/Library/Application\ Support/Codex/Default/Code\ Cache \
       ~/Library/Application\ Support/Codex/Default/GPUCache \
       ~/Library/Application\ Support/Codex/Default/Session\ Storage

Expected behavior
All existing local sessions should remain visible in the Desktop sidebar after an update without manually clearing caches.

Steps to reproduce

  1. Have existing local sessions created before the update.
  2. Update Codex Desktop App to 26.609.30741.
  3. Open the app.
  4. Sidebar shows no previous sessions.

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #27843
  • #27664
  • #26236
  • #26647
  • #26624

Powered by Codex Action

abdul-mustapha · 2 months ago

Workaround did not work for me unfortuantely :(

Everytime I close the app, I lose everything unless its pinned

MumuTW · 2 months ago

Closing as a duplicate of #27843, which identifies the same root cause (thread/list with useStateDbOnly:true returns empty when limit >= 50). I will add my observations and the cache-clearing workaround there.

MumuTW · 2 months ago

@abdul-mustapha Thanks for confirming. Your case matches the underlying bug described in #27843 — the Desktop App\'s thread/list call with useStateDbOnly: true returns an empty list when the limit is >= 50, so the sidebar renders nothing except pinned chats (which are loaded individually). The cache-clearing workaround only works for some people because it happens to change the request path; it does not fix the root cause.

Please follow #27843 for the actual fix.

turismys · 2 months ago

I fixed it successfully

None of the suggested fixes in this issue worked for me (clearing caches, reinstalling the app, etc.).

My Codex installation had been configured to use a custom gateway (I was using a reseller’s server connected to OpenRouter).

My original ~/.codex/config.toml contained:

model_provider = "gateway"
model = "claude-opus-4.8"
[model_providers.gateway]
name = "Gateway"
base_url = "http://45.136.205.7:3188/v1"
wire_api = "responses"
env_key = "OPENAI_API_KEY"
requires_openai_auth = false
supports_websockets = false

I edited it by changing:

model_provider = "openai"
model = "gpt-5.5"

and commented out the entire [model_providers.gateway] section.

Additionally, I downloaded and installed the previous Codex Desktop build:

https://persistent.oaistatic.com/codex-app-prod/Codex-darwin-arm64-26.602.71036.zip

After doing this:

  • all my chats reappeared;
  • the endless reconnect loop stopped;
  • Error 1006 disappeared;
  • Codex started working normally again.

I’m not sure which of these two changes actually fixed the issue (the configuration change, the older build, or the combination of both), but this is what worked in my case.