Codex 常见报错与解决办法
记录了使用 Codex 时遇到的三个常见报错:MCP client 超时、对话中断、长时间 thinking/连接超时。每个问题都给出了具体的原因分析和解决办法,包括修改 config.toml 超时配置、网络重连、终端代理设置。适合被这些报错折磨过的人快速查阅。
·
问题一:MCP client 超时
运行 Codex 时可能会碰到这个报错:
MCP client for `codex_apps` timed out after 30 seconds. Add or adjust `startup_timeout_sec` in your
config.toml:
[mcp_servers.codex_apps]
startup_timeout_sec = XX
⚠ MCP startup incomplete (failed: codex_apps)
Reconnecting...
原因: codex_apps 这个 MCP 服务启动太慢,超过了默认的 30 秒超时。
解决: 打开 config.toml,加上或修改超时配置:
[mcp_servers.codex_apps]
startup_timeout_sec = 60
把超时时间拉长就行,60 秒一般够用,不够就继续加。
问题二:对话中断
Conversation interrupted - tell the model what to do differently. Something went wrong? Hit `/feedback` to report the issue
这个通常出现在网络不稳定或者模型响应超时的时候。检查一下网络连接,重新连接一般就能恢复。
问题三:长时间 thinking 或连接超时
如果 Codex 一直显示 thinking 不动,或者直接连不上,大概率是网络问题。在终端临时设置代理:
export HTTPS_PROXY=http://127.0.0.1:7890
export HTTP_PROXY=http://127.0.0.1:7890
注意这只对当前终端窗口有效,关掉就失效了。如果需要永久生效,写进 ~/.bashrc 或 ~/.zshrc。
代理端口 7890 根据你自己的实际情况改,不一定都是这个。
更多推荐



所有评论(0)