Skip to content

[Windows] "Organization settings could not be loaded" caused by state DB backfill stuck in running after crash — app-server times out after 30s #52836

Description

@allvegetable

Environment

  • Codex Desktop (MSIX): OpenAI.Codex 26.1007.2314.0
  • Bundled CLI: codex-cli 0.162.0-alpha.17.2
  • Windows 11 x64 (build 26200), non-ASCII user profile, CODEX_HOME=D:\codex-data
  • Large history (~1 GB thread_history_1.sqlite)

Symptom

After the app quit/crashed (likely during auto-update), every launch showed
"Organization settings could not be loaded". Reboot, Retry, sign out, moving
config.toml aside, restarting CodexSandboxService did not help. No new desktop
log file was written.

Root cause

Running the bundled app-server manually showed:

state db backfill is running at D:\codex-data; waiting up to 30s before retrying startup initialization
Error: failed to initialize sqlite state runtime under D:\codex-data: timed out waiting for state db backfill at D:\codex-data after 30s (status: running)

state_5.sqlite -> backfill_state row was (1, 'running', NULL, NULL, ...)
and never completed. Each desktop launch restarts the backfill, but it takes
longer than the desktop startup deadline, so the app-server is killed and the
row is left in running again. Subsequent launches see running, wait 30s,
and fail -> the generic network-flavoured dialog. A dead loop.

Workaround that fixed it

  1. Quit the app, back up state_5.sqlite (+ -wal, -shm)
  2. UPDATE backfill_state SET status='pending' WHERE id=1;
  3. Run codex.exe app-server standalone (no desktop) and let it finish the
    backfill (~90s here) until status becomes complete
  4. Launch the desktop app normally -> works

Suggestions

  • Detect a stale running backfill (owner process gone) and reset/resume it
    instead of waiting
  • Don't let the desktop startup deadline kill an in-progress backfill
  • Surface the real error instead of "network/proxy/firewall"

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    windows-osIssues related to Codex on Windows systems
    app-serverIssues involving app server protocol or interfaces
    on Oct 10, 2026
  2. github-actions commented on Oct 10, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions