
SEO关键词:Codex computer-use 不可用 / Windows Codex 插件缺失 / Codex desktop 插件修复 / openai-bundled / computer-use 插件报错

在 Windows 上使用 Codex Desktop 时,进入:
设置 → 电脑操控(Computer Use)
会出现以下问题:
Computer Use 插件不可用computer-use我试过更换节点也不起作用,解决后才发现这类问题本质不是“没安装”,而是:
Windows 下 bundled 插件缓存损坏 / 未正确解包 / marketplace 未加载

这个问题我最终的有效解决方式非常直接:
在 Codex 内直接发送一句提示词,让 AI 自动修复插件环境
在 Codex 输入:
修复一下codex的computer-use插件无法运行的问题执行后,Codex 会自动触发插件重建与缓存修复流程,通常可以恢复。
如果简单提示词无法解决,可以使用下面完整版修复提示词(强制排查 + 重建 bundled 插件)。
⚠️ 这个方案本质是: 让 Codex 在 Windows 本机自动重建
.codex+ bundled marketplace + plugin cache
将以下内容完整复制到 Codex 对话中执行:
你现在要在 Windows 本机环境中排查并尽量修复 Codex Desktop 的 bundled 插件异常。目标是 Windows 用户目录和 Windows Codex 安装目录。
我的问题现象可能包括:
- Codex 更新后 `Computer Use` 或 `Chrome` 插件消失、不可用、图标不加载。
- 插件页能看到 `computer-use@openai-bundled` / `chrome@openai-bundled`,但点进去报错类似:
`marketplace file "%USERPROFILE%\.codex\.tmp\bundled-marketplaces\openai-bundled\.agents\plugins\marketplace.json" does not exist`
- 设置页里 Computer Use 显示 unavailable。
- Codex 日志里可能出现 `EBUSY`、`resource busy or locked`、`plugin_cache_windows_file_lock`、`os error 5`、`extension-host.exe`、`extension-host\windows\x64` 等关键词。
请按下面流程执行。所有路径必须通用化,使用 `$env:USERPROFILE`、`$env:LOCALAPPDATA`、`$env:ProgramFiles` 等变量,不要写死某个用户名。
---
0. 基本原则
1. 先诊断,确认是不是 Windows 文件锁导致的 bundled 插件半更新问题;不要一开始就删除目录或改配置。
2. 修复前必须备份。
3. 不要盲目修改 `[windows] sandbox`。
4. 不要暴露任何 token / API key。
5. 如果无法执行 PowerShell,生成 .ps1 脚本。
---
1. 变量初始化
$CodexHome = Join-Path $env:USERPROFILE ".codex"
$BackupRoot = Join-Path $env:USERPROFILE "codex-plugin-backups"
$Desktop = [Environment]::GetFolderPath("Desktop")
$OpenAILocal = Join-Path $env:LOCALAPPDATA "OpenAI"
$CodexLocal = Join-Path $OpenAILocal "Codex"
$ExtensionManifest = Join-Path $OpenAILocal "extension\com.openai.codexextension.json"
$CodexNativeHosts = Join-Path $CodexHome "chrome-native-hosts.json"
$LocalNativeHosts = Join-Path $CodexLocal "chrome-native-hosts.json"
$BundledTmpRoot = Join-Path $CodexHome ".tmp\bundled-marketplaces\openai-bundled"
$BundledMarketplaceJson = Join-Path $BundledTmpRoot ".agents\plugins\marketplace.json"
$PluginCacheRoot = Join-Path $CodexHome "plugins\cache\openai-bundled"
$ChromeCacheRoot = Join-Path $PluginCacheRoot "chrome"
$ComputerUseCacheRoot = Join-Path $PluginCacheRoot "computer-use"
---
2. 修复前备份(必须执行)
$Stamp = Get-Date -Format "yyyyMMdd-HHmmss"
$BackupDir = Join-Path $BackupRoot "openai-bundled-lock-repair-$Stamp"
New-Item -ItemType Directory -Force -Path $BackupDir | Out-Null
$FilesToBackup = @(
(Join-Path $CodexHome "config.toml"),
(Join-Path $CodexHome ".codex-global-state.json"),
$CodexNativeHosts,
$LocalNativeHosts,
$ExtensionManifest
)
foreach ($file in $FilesToBackup) {
if (Test-Path -LiteralPath $file) {
Copy-Item -LiteralPath $file -Destination $BackupDir -Force
}
}
---
3. 检测 bundled 插件是否损坏
重点检查:
- marketplace.json 是否存在
- chrome / computer-use 是否缺失 scripts / extension-host
- latest 是否指向 .tmp
---
4. 停止插件进程
Get-Process extension-host -ErrorAction SilentlyContinue | Stop-Process -Force
Get-Process codex-computer-use -ErrorAction SilentlyContinue | Stop-Process -Force
---
5. 重建 bundled marketplace
删除:
$CodexHome\.tmp\bundled-marketplaces\openai-bundled
然后从 Codex 安装目录复制:
C:\Program Files\WindowsApps\OpenAI.Codex*\app\resources\plugins\openai-bundled
重新覆盖到:
$CodexHome\.tmp\bundled-marketplaces\openai-bundled
---
6. 重建 plugin cache
重新生成:
- chrome cache
- computer-use cache
- latest junction
---
7. 修复 native host json
确保不再指向:
- .tmp
- chrome\latest
---
8. 最终验证:
- computer-use@openai-bundled 已启用
- chrome 插件存在
- settings 不再显示 unavailable
- marketplace.json 可正常加载从 Windows 环境来看,这个问题通常不是“缺插件”,而是:
.tmp/bundled-marketplaces 残缺EBUSYos error 5plugin_cache_windows_file_lock导致整个插件注册失败
从你提供的界面来看:
Computer Use 插件不可用基本可以判断:
❗ bundled marketplace 未成功加载,而不是功能没安装
先执行一句话修复:
修复一下codex的computer-use插件无法运行的问题不行再用完整版提示词
仍不行才考虑:
.codex\.tmp