patch-codex-fast
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePatch Codex Fast
为Codex打补丁以启用快速模式
Use this skill when the user wants to enable Codex desktop Fast/Speed mode or Plugins while running Codex with an API key instead of ChatGPT OAuth login. Also use it when the user asks whether Codex remote SSH sessions can open files in Zed, or asks to patch Codex so remote files can be opened with Zed.
This skill is the main interface after installation through or a manual symlink. Do not make the user copy long shell snippets from the README. Use the scripts in this repository as execution assets, run the right command for the current OS, then report the result and verification steps.
npx skillsThis is an unofficial local patch. Before changing the app, make sure the user understands that it modifies the installed Codex desktop bundle, disables selected Electron integrity fuses, and may need to be re-applied after Codex updates.
当用户希望在使用API密钥而非ChatGPT OAuth登录运行Codex桌面端时启用快速模式(Fast/Speed mode)或插件功能,或者用户询问Codex远程SSH会话是否可以在Zed中打开文件、请求为Codex打补丁以实现用Zed打开远程文件时,可使用本技能。
本技能是通过或手动创建符号链接安装后的主界面。不要让用户从README中复制冗长的Shell代码片段。请使用本仓库中的脚本作为执行资源,针对当前操作系统运行正确的命令,然后报告结果和验证步骤。
npx skills这是非官方的本地补丁。在修改应用之前,请确保用户了解:该补丁会修改已安装的Codex桌面端包,禁用部分Electron完整性保护机制,并且在Codex更新后可能需要重新应用。
Intent
意图
The user should be able to say:
text
[$patch-codex-fast] Patch my local Codex app so Fast mode and Plugins work in API key mode.Then the agent should execute the workflow end to end, not respond with a manual recipe. The script commands below are for the agent to run, not for the user to copy as the primary path.
用户只需说出:
text
[$patch-codex-fast] Patch my local Codex app so Fast mode and Plugins work in API key mode.随后Agent应端到端执行整个工作流,而不是返回手动操作步骤。下方的脚本命令供Agent运行,而非让用户作为主要操作路径复制使用。
Workflow
工作流
- Identify the repository root that contains this .
SKILL.md - Run a doctor check with the repository script.
- If the environment is valid, run the patch script for the current OS.
- Read the full command output and report:
- whether patch actions were applied,
- any warnings,
- the exact rollback command.
- Ask the user to completely quit and reopen Codex, then verify:
- Fast/Speed mode is visible in API key mode,
- the Plugins sidebar is visible in API key mode,
- plugin install flow no longer marks all connectors unavailable,
- Computer Use settings still show the Google Chrome plugin row.
- If Codex fails to launch or the user reports a broken state, run rollback immediately.
For the Zed remote-open patch only:
- Run or
doctor.zed-remote-status - If the environment is valid, run .
patch-zed-remote - Read the full output and report whether the Zed target was marked and whether the remote URL helper was inserted.
supportsSsh - Tell the user to completely quit and reopen Codex, then verify that a remote Codex file shows Zed under Open With and opens in Zed Remote Development.
- If Codex fails to launch or the user reports a broken state, run rollback immediately.
- 找到包含本文件的仓库根目录。
SKILL.md - 使用仓库中的脚本运行诊断检查。
- 如果环境验证通过,针对当前操作系统运行补丁脚本。
- 读取完整的命令输出并报告:
- 是否已应用补丁操作,
- 任何警告信息,
- 精确的回滚命令。
- 请用户完全退出并重新打开Codex,然后验证:
- 在API密钥模式下可见快速模式(Fast/Speed mode),
- 在API密钥模式下可见插件侧边栏,
- 插件安装流程不再标记所有连接器为不可用,
- “计算机使用”设置中仍显示Google Chrome插件选项。
- 如果Codex无法启动或用户报告异常状态,立即执行回滚操作。
仅针对Zed远程打开补丁:
- 运行或
doctor命令。zed-remote-status - 如果环境验证通过,运行命令。
patch-zed-remote - 读取完整输出并报告Zed目标是否被标记为,以及是否已插入远程URL辅助工具。
supportsSsh - 请用户完全退出并重新打开Codex,然后验证远程Codex文件的“打开方式”选项中显示Zed,且能在Zed远程开发环境中打开。
- 如果Codex无法启动或用户报告异常状态,立即执行回滚操作。
Commands
命令
Prefer the cross-platform Python entrypoint:
bash
python3 scripts/patch_codex_fast.py doctor
python3 scripts/patch_codex_fast.py patch
python3 scripts/patch_codex_fast.py patch-zed-remote
python3 scripts/patch_codex_fast.py zed-remote-status
python3 scripts/patch_codex_fast.py rollbackOn Windows, use if is unavailable:
pythonpython3powershell
python .\scripts\patch_codex_fast.py doctor
python .\scripts\patch_codex_fast.py patch
python .\scripts\patch_codex_fast.py patch-zed-remote
python .\scripts\patch_codex_fast.py zed-remote-status
python .\scripts\patch_codex_fast.py rollbackWrappers are also available:
bash
./scripts/macos-patch.sh
./scripts/macos-rollback.shpowershell
.\scripts\windows-patch.ps1
.\scripts\windows-rollback.ps1优先使用跨平台的Python入口:
bash
python3 scripts/patch_codex_fast.py doctor
python3 scripts/patch_codex_fast.py patch
python3 scripts/patch_codex_fast.py patch-zed-remote
python3 scripts/patch_codex_fast.py zed-remote-status
python3 scripts/patch_codex_fast.py rollback在Windows系统中,如果不可用,请使用:
python3pythonpowershell
python .\scripts\patch_codex_fast.py doctor
python .\scripts\patch_codex_fast.py patch
python .\scripts\patch_codex_fast.py patch-zed-remote
python .\scripts\patch_codex_fast.py zed-remote-status
python .\scripts\patch_codex_fast.py rollback也提供封装脚本:
bash
./scripts/macos-patch.sh
./scripts/macos-rollback.shpowershell
.\scripts\windows-patch.ps1
.\scripts\windows-rollback.ps1Default paths
默认路径
macOS:
- Resources:
/Applications/Codex.app/Contents/Resources - App path:
/Applications/Codex.app
Windows:
- Resources:
%LOCALAPPDATA%\Programs\Codex\resources - App path:
%LOCALAPPDATA%\Programs\Codex\Codex.exe
If Codex is installed somewhere else, pass and to the Python command.
--resources-dir--app-pathmacOS系统:
- Resources:
/Applications/Codex.app/Contents/Resources - App path:
/Applications/Codex.app
Windows系统:
- Resources:
%LOCALAPPDATA%\Programs\Codex\resources - App path:
%LOCALAPPDATA%\Programs\Codex\Codex.exe
如果Codex安装在其他位置,请在Python命令中传入和参数。
--resources-dir--app-pathRollback policy
回滚策略
Rollback is part of the skill, not an afterthought. If patching fails after files were changed, or if the app does not launch, run:
bash
python3 scripts/patch_codex_fast.py rollbackOn Windows:
powershell
python .\scripts\patch_codex_fast.py rollbackThe rollback script must restore before deleting , then restore the stock Electron fuses and re-sign on macOS. If macOS blocks writing inside with , stop before deleting ; grant App Management access or move the app bundle aside, copy it back, restore , and re-sign.
app.asarapp//Applications/Codex.appOperation not permittedapp/app.asar回滚是本技能的一部分,而非事后补救措施。如果在文件修改后补丁应用失败,或者应用无法启动,请运行:
bash
python3 scripts/patch_codex_fast.py rollback在Windows系统中:
powershell
python .\scripts\patch_codex_fast.py rollback回滚脚本必须在删除目录前恢复文件,然后在macOS系统中恢复默认的Electron保护机制并重新签名。如果macOS系统提示“Operation not permitted”(操作不被允许)而阻止写入目录,请在删除目录前停止操作;授予应用管理权限或将应用包移至别处,再复制回来,恢复文件并重新签名。
app/app.asar/Applications/Codex.appapp/app.asarBundle update handling
包更新处理
When Codex updates, bundle hashes and minified variable names may change. First re-run the skill normally. If the script reports , inspect the extracted directory with these searches:
No patches were appliedapp/webview/assetsbash
grep -rl "authMethod" *.js | xargs grep -l "fast_mode"
grep -rl "pluginsDisabledTooltip" *.js当Codex更新后,包哈希值和压缩后的变量名可能会变化。首先正常重新运行本技能。如果脚本报告(未应用任何补丁),请使用以下搜索命令检查提取后的目录:
No patches were appliedapp/webview/assetsbash
grep -rl "authMethod" *.js | xargs grep -l "fast_mode"
grep -rl "pluginsDisabledTooltip" *.jsGate exported from gradient-*.js. Two known variants live in the wild:
Gate exported from gradient-*.js. Two known variants live in the wild:
older builds: function e(e){return e===apikey
}
apikeyolder builds: function e(e){return e===apikey
}
apikeynewer builds: function e(e){return e!==chatgpt
}
chatgptnewer builds: function e(e){return e!==chatgpt
}
chatgptBoth should be rewritten to return false
.
return falseBoth should be rewritten to return false
.
return falsegrep -rlE 'return [A-Za-z_$]+(===|!==)' *.js | grep -v locale
grep -rl "connector-unavailable" *.js | grep plugin
(apikey|chatgpt)
Patch the same logical gates described in the README if automated patterns no longer match. Also preserve Chrome by checking these app-bundle surfaces:
```bash
grep -rl "chrome-internal" app/.vite/build
grep -rl "externalBrowserUseAllowed" app/.vite/build
grep -rl "isExternalBrowserUseAvailable" app/webview/assetsThe current fix maps the Dev runtime Chrome plugin name from to , keeps the Chrome marketplace descriptor from being dropped by the external-browser feature gate, and prevents the renderer plugin list from hiding Chrome when is false.
chrome-internalchromeisExternalBrowserUseAvailableFor Zed remote-open support, inspect the main process open-target bundle:
bash
grep -rl "id:\`zed\`" app/.vite/build
grep -rl "supportsSsh" app/.vite/build
grep -rl "vscode-remote://" app/.vite/buildThe Zed patch keeps local Zed behavior unchanged, marks Zed as SSH-capable for Codex remote sessions, and converts the remote path passed by Codex into a Zed Remote Development URL such as . Prefer Codex’s structured SSH config fields over the display alias so Zed does not fall back to the wrong local macOS username.
ssh://user@host[:port]/pathgrep -rlE 'return [A-Za-z_$]+(===|!==)' *.js | grep -v locale
grep -rl "connector-unavailable" *.js | grep plugin
(apikey|chatgpt)
如果自动匹配模式失效,请按照README中描述的逻辑进行手动补丁。同时,请通过检查以下应用包内容来保留Chrome插件功能:
```bash
grep -rl "chrome-internal" app/.vite/build
grep -rl "externalBrowserUseAllowed" app/.vite/build
grep -rl "isExternalBrowserUseAvailable" app/webview/assets当前修复方案将开发环境下的Chrome插件名称从映射为,确保Chrome应用市场描述符不会被外部浏览器功能限制移除,并且在为false时,渲染器插件列表不会隐藏Chrome。
chrome-internalchromeisExternalBrowserUseAvailable对于Zed远程打开功能支持,请检查主进程的打开目标包:
bash
grep -rl "id:\`zed\`" app/.vite/build
grep -rl "supportsSsh" app/.vite/build
grep -rl "vscode-remote://" app/.vite/buildZed补丁保持本地Zed的行为不变,将Zed标记为支持Codex远程会话的SSH目标,并将Codex传递的远程路径转换为Zed远程开发URL,例如。优先使用Codex的结构化SSH配置字段而非显示别名,以避免Zed错误地回退到本地macOS用户名。
ssh://user@host[:port]/pathSuccess criteria
成功标准
The task is not complete until the agent has command evidence for the patch or rollback path and has told the user exactly what to verify in the Codex UI, including the Google Chrome row under Computer Use for the Fast/Plugins patch or the remote Open With → Zed flow for the Zed remote patch.
只有当Agent获取到补丁或回滚操作的命令执行证据,并告知用户在Codex界面中需要验证的具体内容(包括快速模式/插件补丁对应的“计算机使用”中的Google Chrome选项,或Zed远程补丁对应的远程文件“打开方式”→Zed流程)后,任务才算完成。