[App] Windows setup hangs after invalid TOML written to shell_environment_policy.set
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with %CODEX_HOME%/config.toml handling for shell_environment_policy.set and the Windows “Finish Windows setup”/Retry path. Inspect how the malformed table header is written and how parse failures are handled. Done means config writes remain valid TOML and an invalid config produces a clear parse error instead of routing into the setup gate.
Written by the indexing model from the issue text.
Description
What version of the Codex App are you using (From "About Codex" dialog)?
26.715.21425
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
After an app update and reboot, the app gets stuck on the "Finish Windows setup" screen ("ChatGPT necesita un permiso por única vez para funcionar en tu computadora"). The UAC dialog shown there never triggers a real Windows elevation prompt, and clicking "Retry" fails instantly — same symptom already reported in openai/codex#32149, openai/codex#32248 and openai/codex#32492.
Root cause found on my machine: %CODEX_HOME%\config.toml contained invalid TOML. Instead of a normal inline table:
[shell_environment_policy]
set = {}
the file had a malformed, two-line table header with a comment embedded inside the brackets:
[# Explicit key/value overrides (always win). Default: {}
shell_environment_policy.set ]
BROWSER_USE_AVAILABLE_BACKENDS = "chrome"
NODE_REPL_TRUSTED_BROWSER_CLIENT_SHA256S = "..."
NODE_REPL_TRUSTED_CODE_PATHS = '...'
This is not valid TOML (a [table] header can't span two lines or contain a # before the key path), so config.toml fails to parse, and the app appears to misroute that failure into the "Finish Windows setup" gate instead of showing a config error.
What steps can reproduce the bug?
- Not fully reproducible on demand — it appears to happen when the app rewrites
shell_environment_policy.setinconfig.toml, likely while persisting a newNODE_REPL_TRUSTED_BROWSER_CLIENT_SHA256Sentry (browser-tool trust update) during/after an app update. - After it happens,
config.tomlcontains the malformed table header shown above, and the app hangs on "Finish Windows setup" on every subsequent launch, with "Retry" failing instantly. - Workaround: close the app, rename
config.toml(e.g. toconfig.toml.old), relaunch — the app regenerates a fresh, validconfig.tomland starts normally.
Note: this isn't a one-off — I keep a version-controlled backup of this file, and the same shell_environment_policy.set corruption pattern shows up across multiple past syncs, meaning this write bug has recurred more than once on this machine.
What is the expected behavior?
config.toml writes should always produce valid TOML. If the file is ever invalid, the app should surface a clear "config.toml failed to parse: " message instead of silently hanging on the Windows sandbox setup screen with a non-functional Retry button.
Additional information
Happy to share a redacted copy of the corrupted config.toml if useful for reproducing the serializer bug. Related: openai/codex#32149, openai/codex#32248, openai/codex#32492.
- 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 ·