使用Codex出xian现「computer-use 插件不可用」的解决方法

    • 删除 .codex\.tmp
    • 重建 plugin cache

      Windows 使用 Codex 出现「computer-use 插件不可用」的解决方法(已验证)

       

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


      一、问题现象

      image

       

      在 Windows 上使用 Codex Desktop 时,进入:

      设置 → 电脑操控(Computer Use)

      会出现以下问题:

      • 显示:Computer Use 插件不可用
      • 左侧插件列表中找不到 computer-use
      • 即使是最新版本 Codex 客户端也无法解决
      • 插件页面可能完全缺失 bundled 插件

      我试过更换节点也不起作用,解决后才发现这类问题本质不是“没安装”,而是:

      Windows 下 bundled 插件缓存损坏 / 未正确解包 / marketplace 未加载


      二、关键结论(先说结果)

      image

       

      这个问题我最终的有效解决方式非常直接:

      在 Codex 内直接发送一句提示词,让 AI 自动修复插件环境

      ✅ 有效修复提示词(最短版本)

      在 Codex 输入:

      代码语言:javascript

      AI代码解释

       
      修复一下codex的computer-use插件无法运行的问题

      执行后,Codex 会自动触发插件重建与缓存修复流程,通常可以恢复。


      三、如果仍然无效(推荐完整版修复方案)

      如果简单提示词无法解决,可以使用下面完整版修复提示词(强制排查 + 重建 bundled 插件)

      ⚠️ 这个方案本质是: 让 Codex 在 Windows 本机自动重建 .codex + bundled marketplace + plugin cache


      四、完整版修复提示词(重点)

      将以下内容完整复制到 Codex 对话中执行

      代码语言:javascript

      AI代码解释

       
      你现在要在 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 环境来看,这个问题通常不是“缺插件”,而是:

      1. 半更新状态(最常见)
      • Codex 更新时插件未完整解包
      • .tmp/bundled-marketplaces 残缺
      2. Windows 文件锁
      • EBUSY
      • os error 5
      • plugin_cache_windows_file_lock
      3. marketplace.json 丢失

      导致整个插件注册失败


      六、截图里的状态判断

      从你提供的界面来看:

      • Computer Use 插件不可用
      • 且插件列表为空

      基本可以判断:

      ❗ bundled marketplace 未成功加载,而不是功能没安装


      七、推荐处理顺序(最稳)

      先执行一句话修复:

      代码语言:javascript

      AI代码解释

       
      修复一下codex的computer-use插件无法运行的问题

      不行再用完整版提示词

      仍不行才考虑:

    • 删除 .codex\.tmp
    • 重建 plugin cache
    •  
© 版权声明
THE END
喜欢就支持一下吧
点赞10 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容