Codex Windows App 最佳开发实践体验 01

用的不多,但是先发出来吧,主要有俩需要关注下

  • 配置 CPA
  • AGENTS.md 配合 WSL 使用

账号先使用 CLIProxyAPI(以下用CPA指代)反代,确定 baseUrl: http://127.0.0.1:8317

为什么要反代,因为不反代即使开了代理也很卡:melting_face:

配置

以下配置文件都位于 ~/.codex 目录下,即 C:\Users\替换成你的名称\.codex,如果目录和文件都不存在,创建即可。

  • config.toml

最顶部,挨着模型配置填 baseUrl,一定要顶部,否则可能识别不到

model = "gpt-5.4"
model_reasoning_effort = "xhigh"
model_reasoning_summary = "detailed"
model_supports_reasoning_summaries = true
openai_base_url = "http://127.0.0.1:8317/v1"



approval_policy = "on-request"
personality = "none"
sandbox_mode = "danger-full-access"  # 为什么 full-acess,因为我还没被删过盘 :) 见下方的 AGENTS.md 吧,主要它在起作用
[sandbox_workspace_write]
network_access = true # 允许联网,和 web_search 不同,它是访问互联网,比如推送到 github 等,若没有配置则会需要你手动授权

[features]
collaboration_modes = true
steer = true

[windows]
sandbox = "elevated"
  • auth.json

API KEY 来自你的 CPA

{
    "OPENAI_API_KEY": "sk-xxxx"
}
  • AGENTS.md
- Prefer Linux tools for search, inspection, editing, build, test, and git.
- Use `pwsh.exe` only for Windows-only tasks, never use cmd.exe if possible.

接下来打开你的 Codex App 吧,enjoy ~


开启 WSL

实际体验

不会再使用丑陋的 Powershell.exe 或者 cmd.exe (删盘的罪魁祸首)了,使用 Linux 工具查询,嘻嘻

16 个赞

我 windows codex app 用WSL环境特别卡,换成windows就不会,佬有这种情况吗

2 个赞

内存有 32G 吗,低了确实卡

1 个赞

是32G的,暗影精灵11

1 个赞

先mark了,回头试试

那就不清楚了,你可以试试在 WSL2 环境下用 codex-cli 看看

好的,谢谢佬

感谢大佬 。

想问问代理那块怎么设置,我一直连不上 奇怪了
换了WSL后一直提示
Reconnecting... 5/5 stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

收藏一下,以后试试

1 个赞

或者直接开 TUN