Codex desktop app freezes on startup: MCP Windows path in config.toml triggers TOML parsing failure
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the failure with the user’s .codex/config.toml MCP configuration on Windows, then trace the startup config-loading path and the reported config/reload, plugin/list, and windowsSandbox/setupStart failures. Done should mean malformed configuration no longer leaves the desktop app stuck at startup and the UI reports the config path, line number, and recovery action.
Written by the indexing model from the issue text.
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.803.5235.0 (Microsoft Store / OpenAI.Codex)
What subscription do you have?
plus
What platform is your computer?
Windows 10 Build 26100 x64
What issue are you seeing?
Microsoft Store 版 Codex 桌面应用启动后窗口可以打开,但一直卡在加载/启动页面,无法进入主界面。修复、重置、重装应用均无效。
本地排查发现,原因是用户目录下的 config.toml 存在 TOML 语法错误:MCP 配置中的 Windows 路径使用了 TOML 双引号字符串,但路径里的反斜杠没有转义。
示例:
args = ["-NoLogo", "...", "-File", "F:\ChatGPT-projiect\deepseek-mcp-local\start-deepseek-mcp.ps1"]
在 TOML 双引号字符串中,\d 是非法转义序列,导致整个配置解析失败。
日志反复出现:
failed to reload config: C:\Users<user>.codex\config.toml:150:77:
missing escaped value, expected b, e, f, n, r, \, ", x, u, U
受影响功能看起来包括:
- config/read
- plugin/list
- bundled_plugins_reconcile
- windowsSandbox/setupStart
最终表现为 UI 无限等待,用户只能看到启动页卡死,没有明确错误提示。
What steps can reproduce the bug?
- 在 Windows 上安装 Microsoft Store 版 ChatGPT/Codex。
- 在 C:\Users<user>.codex\config.toml 中添加一个 MCP server 配置。
- 在 args 里使用 TOML 双引号字符串保存 Windows 路径,例如:
args = ["-NoLogo", "...", "-File", "F:\ChatGPT-projiect\deepseek-mcp-local\start-deepseek-mcp.ps1"] - 重启 Codex。
- Codex 窗口显示,但卡在加载/启动页,无法进入主界面。
临时修复:将路径改为正斜杠后可以正常启动:
args = ["-NoLogo", "...", "-File", "F:/ChatGPT-projiect/deepseek-mcp-local/start-deepseek-mcp.ps1"]
或者使用 TOML 单引号字符串:
args = ['-NoLogo', '...', '-File', 'F:\ChatGPT-projiect\deepseek-mcp-local\start-deepseek-mcp.ps1']
What is the expected behavior?
- config.toml 解析失败时,不应阻塞整个 Codex 应用启动。
- Codex 应进入 safe mode / fallback,跳过损坏的 MCP 配置段。
- UI 应显示明确错误,例如:“config.toml 第 150 行语法错误,MCP server deepseek 已跳过。”
- 如果路径由 GUI 写入,应自动使用 /、\,或 TOML 单引号字符串。
- 启动阶段应先做配置健康检查,避免所有 RPC handler 因配置错误而不可用。
Additional information
此问题对普通用户很难定位,因为重装、重置和修复应用都不会自动移除用户目录下损坏的 C:\Users<user>.codex\config.toml。建议启动失败时在 UI 中暴露具体配置文件路径、行号和可恢复操作。
- 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 ·