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
- Quit the app, back up state_5.sqlite (+ -wal, -shm)
UPDATE backfill_state SET status='pending' WHERE id=1;
- Run
codex.exe app-server standalone (no desktop) and let it finish the
backfill (~90s here) until status becomes complete
- 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"
Environment
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_5.sqlite->backfill_staterow 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
runningagain. Subsequent launches seerunning, wait 30s,and fail -> the generic network-flavoured dialog. A dead loop.
Workaround that fixed it
UPDATE backfill_state SET status='pending' WHERE id=1;codex.exe app-serverstandalone (no desktop) and let it finish thebackfill (~90s here) until status becomes
completeSuggestions
runningbackfill (owner process gone) and reset/resume itinstead of waiting