https://linux.do/t/topic/999965
上次说codex巨慢,原来是win上面的各种奇特bug,现在巨好用!!!
如果有需要的佬可以留言,我出个教程(codex你一点也不乘,完全没有考虑win用户)
65专属
![]()
我上次吐槽的帖子居然有65耶
1.使用各种奇怪的编辑方式进行编辑的解决办法(codex慢的罪魁祸首)
Codex CLI问题
- 命令包裹
这其实是两者共性的问题,你可以看到一堆命令是用 pwsh -nologo 这种方式转义执行的,效率非常低,这也是codex执行慢的一部分原因,这个可以通过 AGENTS.md 中强制让其直接执行命令,把这行加到 AGENTS.md 可以解决这个问题
Hard Requirement: call binaries directly in functions.shell, always set workdir, and avoid shell wrappers such as `bash -lc`, `sh -lc`, `zsh -lc`, `cmd /c`, `pwsh.exe -NoLogo -NoProfile -Command`, and `powershell.exe -NoLogo -NoProfile -Command`.
- 使用 python 编辑文件
这是 codex 模型的特有问题,有大佬分析出来,codex模型不会调用系统工具 apply_patch,把下面这段放到 AGENTS.md 中可以使用系统的编辑工具
- Text Editing Priority: Use the `apply_patch` tool for all routine text edits; fall back to `sed` for single-line substitutions only if `apply_patch` is unavailable, and avoid `python` editing scripts unless both options fail.
- `apply_patch` Usage: Invoke `apply_patch` with the patch payload as the second element in the command array (no shell-style flags). Provide `workdir` and, when helpful, a short `justification` alongside the command.
- Example invocation:
```bash
{"command":["apply_patch","*** Begin Patch\n*** Update File: path/to/file\n@@\n- old\n+ new\n*** End Patch\n"],"workdir":"<workdir>","justification":"Brief reason for the change"}
2.终端的中文乱码
方案一(最最简单的)
添加提示词
**对话开始前,判断当前系统环境,如果是`windows`系统,则先执行如下指令,在进行其他操作:**
[Console]::InputEncoding = [Text.UTF8Encoding]::new($false)
[Console]::OutputEncoding = [Text.UTF8Encoding]::new($false)
chcp 65001 > $null```
方案二
直接使用git-bash
方案三(还是不能解决看这个佬的)
https://linux.do/t/topic/974813
方案四(不推荐,会导致某些旧软件无法使用)
1.打开 Windows 设置 → 时间和语言 → 语言和区域。
2.在右侧找到并点击 “管理语言设置”。
3.在弹出的新窗口中,切换到 “管理” 选项卡。
4.点击 “更改系统区域设置…” 按钮。
5.在弹出的窗口中,勾选最下方的 “Beta: 使用 Unicode UTF-8 提供全球语言支持”。
6.点击“确定”,然后在重启电脑即可。
3.codex在终端/插件需要一直手动确认
在终端:
codex插件问题求助 - #5,来自 pluto233
在/approve 选择 full access
在插件



