Windows power loss zero-fills config.toml and hangs desktop + VS Code Codex
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
Research direction
Start by tracing the config/read path and the handling of ~/.codex/config.toml, using the reported Windows logs and zero-filled file as the reproduction. Review how malformed configuration is handled by the desktop app and VS Code extension. Done means corrupted shared state no longer leaves either client hanging and recovery produces defaults or an actionable error.
Written by the indexing model from the issue text.
Description
Summary
After an unexpected Windows power loss, ~/.codex/config.toml became a 4,146-byte file containing only 0x00 bytes. Both the Codex Windows desktop app and the Codex VS Code extension then hung indefinitely during startup.
The desktop app, extension, Windows, and machine had all been restarted. Repairing/resetting and reinstalling the app did not resolve the problem because the corrupted shared configuration remained in ~/.codex.
Replacing the corrupted file with an empty, valid config.toml immediately restored both clients.
Environment
- Windows 11, build 26100
- Codex desktop:
26.715.4045.0 - VS Code Codex extension:
26.715.31925-win32-x64 - Shared config path:
C:\Users\Administrator\.codex\config.toml - Official feedback thread:
019f78da-15b2-7a72-a9c4-897fd7a5bcdd
Observed behavior
-
Windows lost power unexpectedly.
-
After reboot, Codex desktop remained on the loading/splash screen indefinitely.
-
The VS Code Codex extension also remained stuck and did not become usable.
-
Restarting processes and Windows, updating, repairing/resetting, and reinstalling did not fix either client.
-
Inspection showed that
config.tomlwas exactly 4,146 bytes long and every byte was0x00:TotalBytes=4146 ZeroBytes=4146 NonZeroBytes=0 FirstNonZeroOffset=-1 LastNonZeroOffset=-1 -
Both desktop and extension logs repeatedly reported configuration-read failures.
Relevant log messages
VS Code extension:
codex_app_server: Invalid configuration; using defaults.
C:\Users\Administrator\.codex\config.toml:1:4147: key with no value, expected `=`
failed to read configuration layers:
C:\Users\Administrator\.codex\config.toml:1:4147: key with no value, expected `=`
Codex desktop repeatedly reported:
Request failed ... method=config/read ...
failed to read configuration layers:
C:\Users\Administrator\.codex\config.toml:1:4147: key with no value, expected `=`
The message says "using defaults", but the clients continued calling config/read and never recovered or displayed an actionable error.
Workaround
Copy-Item "$env:USERPROFILE\.codex\config.toml" `
"$env:USERPROFILE\.codex\config.toml.corrupt.bak"
[IO.File]::WriteAllText(
"$env:USERPROFILE\.codex\config.toml",
'',
(New-Object Text.UTF8Encoding($false))
)
After restarting Codex and reloading VS Code, both clients worked again.
Expected behavior
- Configuration writes should use a crash-safe atomic replacement strategy and preserve a last-known-good copy.
- A truncated or zero-filled configuration should be detected during startup.
- Codex should quarantine the corrupted file and actually continue with defaults, or show an actionable recovery dialog.
- A malformed shared config should not leave both desktop and IDE surfaces hanging indefinitely.
- Repair/reset/reinstall flows should detect or clearly report corruption in shared
~/.codexstate.
Impact
Because desktop and IDE surfaces share ~/.codex/config.toml, a single interrupted write can disable both clients. The current splash-screen symptom gives no indication that the shared configuration is the cause, making common recovery steps ineffective.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·