openai / openai/codex

Malformed config.toml can trigger repeated Windows setup loop and desktop input stutter

Open
#38,500 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug config performance windows-os
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

Summary

On Windows, a malformed ~/.codex/config.toml caused the Codex desktop app to repeatedly enter/check Windows setup. Each retry visibly coincided with a short mouse/input stutter. Reinstalling the app did not fix the issue because the malformed user config persisted.

The app became usable again after removing the malformed TOML entry and restarting the desktop app.

Observed error

The desktop app showed an error similar to:

ChatGPT cannot load config.toml, so this conversation cannot continue.
Please fix ...\.codex\config.toml:60:66: unclosed table, expected ']'

The malformed entry was a [projects.'...'] table containing a corrupted/non-ASCII Windows project path whose quoted table key was no longer properly closed.

Behavior

While the malformed config was present:

  1. Codex repeatedly showed Windows setup / Windows settings status messages.
  2. The setup message reappeared periodically.
  3. Each reappearance correlated with a brief mouse/input hitch.
  4. Codex conversations could not proceed normally because config loading failed.
  5. Reinstalling the desktop app did not resolve the problem.

After removing only the malformed project table from config.toml and restarting the app:

  • the config loaded successfully;
  • Codex opened normally;
  • the repeated Windows setup loop stopped;
  • the periodic mouse/typing stutter disappeared.

Relevant config

A valid Windows fallback setting was present elsewhere in the config:

[windows]
sandbox = "unelevated"

However, because the TOML parser failed earlier in the file, this setting appeared not to be applied reliably until the syntax error was fixed.

Environment

  • Windows desktop app
  • Observed package/process path referenced a build similar to OpenAI.Codex_26.803.10989.0_x64
  • config.toml stored under the normal user-level ~/.codex directory

Notes on how the malformed config may have been created

Before the failure, a local automation/script had rewritten Codex configuration values. The exact source of the malformed project entry is not proven, so I would not attribute the corruption to Codex itself without further evidence.

The more actionable issue is the recovery behavior: a single TOML syntax error appears able to put the Windows desktop app into a repeated setup/preflight loop that causes noticeable UI/input stalls.

Suggested improvements

  1. If config.toml fails to parse, stop Windows sandbox/setup retries rather than repeatedly entering setup/preflight.
  2. Surface the config parse error as the primary blocking condition with a clear recovery action.
  3. Consider loading a minimal safe default config when parsing fails, or at least avoid invoking unrelated Windows setup checks.
  4. Consider preserving/repairing malformed project trust entries independently so one bad [projects.*] key does not destabilize the entire desktop startup flow.
  5. If setup/preflight is retried, add backoff and avoid work on the UI/input-sensitive path.

Workaround

  1. Exit Codex/ChatGPT completely.
  2. Back up ~/.codex/config.toml.
  3. Locate and remove/fix the malformed TOML table entry.
  4. Verify the file parses and that the intended [windows] sandbox setting is still present.
  5. Restart the desktop app.

This fully resolved the repeated setup loop and input stutter in the observed case.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the malformed ~/.codex/config.toml scenario and inspect the Windows setup/preflight retry behavior when parsing fails. Verify that the parse error becomes the primary blocking message, retries stop or back off without repeated setup work, and a valid config with the [windows] sandbox setting still loads normally without input stutter.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.