用的不多,但是先发出来吧,主要有俩需要关注下
- 配置 CPA
- AGENTS.md 配合 WSL 使用
账号先使用 CLIProxyAPI(以下用CPA指代)反代,确定 baseUrl:
http://127.0.0.1:8317
为什么要反代,因为不反代即使开了代理也很卡![]()
配置
以下配置文件都位于 ~/.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 工具查询,嘻嘻

