A small, transparent launcher that starts the official Codex Windows desktop app with its Git integration disabled for that process only.
This is an unofficial workaround for a Codex desktop issue where project/sidebar or Changes/Review refreshes can continuously create and cancel short-lived Git processes. The resulting git.exe, taskkill.exe, and conhost.exe process storm can also drive up WMI Provider Host and Microsoft Defender CPU usage.
中文说明见下半部分。
The launcher:
- Finds the installed Microsoft Store/MSIX package named
OpenAI.Codex. - Refuses to continue while Codex is already running, because Electron environment variables are fixed at process startup.
- Sets
GIT_DIR=NULandGIT_OPTIONAL_LOCKS=0only in the launcher process. - Starts the original, signed Codex executable from its installed package.
It does not modify the Codex installation, registry, repositories, Git configuration, system environment, or chat history. It does not require administrator privileges.
- Download
Codex-Git-Disabled.cmd. - Exit Codex completely from the Windows system tray. Closing only the window may leave the app running.
- Double-click
Codex-Git-Disabled.cmd.
To verify that the installed Codex package can be found without starting it:
Codex-Git-Disabled.cmd --checkTo restore normal Git integration, exit Codex and start it from the regular Start menu or official shortcut.
- Codex Review, Changes, branch detection, commit, and other Git-backed UI features will be unavailable or incomplete.
- Git operations launched from inside Codex may also be unavailable, depending on how that Codex build sanitizes child-process environments.
- Git in separately opened terminals and other applications is unaffected.
- This launcher does not enable internal builds, test entitlements, or hidden feature gates.
- The script currently targets the Windows package named
OpenAI.Codex.
One Windows reproduction with a large dirty worktree produced the following process-creation rates:
| Measurement | Normal launch | Workaround after startup stabilized |
|---|---|---|
New git.exe processes |
247 per 10 seconds | 0 per 15 seconds |
New taskkill.exe processes |
137 per 10 seconds | 0 per 15 seconds |
New conhost.exe processes |
259 per 10 seconds | No Git-associated storm observed |
| WMI Provider Host CPU | about 6.6% | about 0.9% |
| Microsoft Defender CPU | about 5.9% | about 2.6% and falling |
These numbers document one reproduction, not a performance guarantee.
Related reports:
The script is plain text and intentionally small. Review it before running. It performs no downloads, elevation, installation patching, registry writes, repository writes, or process termination.
这是一个透明的单文件启动器,仅对本次启动的官方 Codex Windows 桌面程序禁用 Git 集成。
部分 Codex 桌面版本在项目侧边栏或 Changes/Review 刷新时,会持续创建并取消短命的 git.exe,同时产生大量 taskkill.exe 和 conhost.exe,继而拉高 WMI Provider Host 与 Microsoft Defender 的 CPU 占用。
- 下载
Codex-Git-Disabled.cmd。 - 从 Windows 系统托盘彻底退出 Codex;只关闭窗口可能不会结束后台进程。
- 双击
Codex-Git-Disabled.cmd。
恢复正常 Git 功能时,彻底退出 Codex,再通过开始菜单或官方快捷方式启动即可。
- 不修改官方安装包、注册表、仓库、Git 配置、系统环境变量或聊天历史。
- 不需要管理员权限,也不会结束任何进程。
- Codex 内的 Review、Changes、分支检测和提交等 Git 功能将不可用或不完整。
- 单独打开的 PowerShell、CMD、Git Bash 及其他程序不受影响。
- 这不是测试版权限工具,也不会开启内部功能或服务端灰度权限。