惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
SecWiki News
SecWiki News
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
Jina AI
Jina AI
N
Netflix TechBlog - Medium
GbyAI
GbyAI
IT之家
IT之家
Apple Machine Learning Research
Apple Machine Learning Research
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
C
Cybersecurity and Infrastructure Security Agency CISA
I
Intezer
T
Tor Project blog
P
Palo Alto Networks Blog
P
Privacy & Cybersecurity Law Blog
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
Cloudbric
Cloudbric
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
Forbes - Security
Forbes - Security
Last Week in AI
Last Week in AI
S
Security Affairs
博客园 - Franky
F
Fortinet All Blogs
量子位
M
MIT News - Artificial intelligence
C
Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
S
Secure Thoughts
V
Visual Studio Blog
AI
AI
美团技术团队
B
Blog RSS Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
人人都是产品经理
人人都是产品经理
Microsoft Security Blog
Microsoft Security Blog
T
Threatpost
Cyberwarzone
Cyberwarzone

LINUX DO - 最新话题

谷歌云盘下载700g数据集,求方法 OpenAI推出了100美元的Pro订阅后,plus的Codex 5小时限额大幅缩水 之前买的super grok居然还没掉 关于CPA认证文件周限 佬们,默认CDK的要求是什么等级啊? 最新版本的微信群聊机器人方案 有没有人知道如何free号没有封,那么是否可以循环使用,因为我看主要是周限 L站改版了?吓我一跳,我以为我浏览器崩了 淘宝这种宽带可信吗,500兆移动宽带月费8元到2099年 docker内部应用访问宿主机mysql和redis时被拒绝connection refuse Erp全栈想转行做Ai有什么推荐的吗 boost有bug 佬们,有没有靠谱点的 Plus 购买渠道 大妈,狗妈用的 lg 服务有源头开源项目吗? 有人有能过验证码打码的嘛 上次帖里好像发过通过大模型来打码的 gpt plus 封号似乎也太快了点,一天就给封号了 按流量/token收费的国产官方AI推荐 我算是知道了为什么Oracle总是ABC了 佬友们帮我分析一下 ChatGPT Team账号只有一个人使用和4个席位邀请满了使用的总额度是一样的吗? gpt-free 10个带rt CPA反代claude是默认1m吗? 我终于敢说我做出来windows上tmux的替代了,目标windows/全平台最强的终端Ai编程工具 claude pro升级max,除了原来的$20,好像还能再领一次$100 关于AI agent的知识框架 独乐乐不如众乐乐,分享一下我的的AI对话程序 佬们自建网站支付问题是怎么解决的 怎么能让gpt模仿claude风格输出 codex free已经死了,下一个会是plus或者team吗 请问chatgpt pro里的fast模式,速度快了,降智吗 天才程序员想要复活,还有可用的codex公益站么 里斯本丸沉没照进现代了 [富可敌国] [一叶知秋API]友仔们 我们换域名了~~ 记得更新一下哦 有点莫名其妙,被阿里云警告了 从道观回家之前,我和师兄问道 【picpi 皮皮公益站】为了防止有人拿去卖,邀请码发放规则更新。 美国 FAA: 我们需要你,游戏玩家,来当空管吧 vibe时用文言省tok吗? 有没有用? 会降表现吗? Codex CLI 官方这个 imagegen 的 Skill 到底是干啥的?哪有对应工具啊? 求问关于尼区和美区开通Claude 换设备登录telegram国内号码老账号 需要收费咋办? 发现hotmail的额度特别耐用 最近还有能正常用的claude中转站吗? 避雷闲鱼上面的CC中转站 现在cursor的优势是什么呢? OpenAI 回应马斯克要求罢免奥尔特曼:搞法律突袭,扰乱诉讼 谁在吹opencode go套餐啊,又慢量又少 【SamAltman】奥特曼被燃烧瓶袭击后的回应 咸鱼上359买的claude MAX 5x ,美国假家宽,看看能活几天 想问问跳蚤市场开的Pro和Plus 虚拟卡链接求助 [开源插件] 做了一个适合科研佬的GPT插件 【AI小说】拿AI跑了一部小说,佬们看看质量怎么样 总是能在首页看到opus4.6鞭尸推送 这个别名邮箱可以注册gpt 一个人在外地的话,佬们周末都做什么 你们ddg还能行不 获取不到新的邮箱 了····· claude code修复codex windows升级0.120.0 无法打开问题 我现在Zeabur上搭建了CPA服务,怎么再接入new api来做分发 杭州有么有佬友在搞AI应用这块的,四年前端转AI开发 汇丰、渣打两家银行获得香港稳定币牌照 【开源推广】 AIUsage:聚合多个 AI 平台配额与用量的 高颜值 macOS端 CPA看板 APP Newapi吃服务器内存多吗 中行跨境通疑限制无卡连续交易 或为应对盗刷 突然不能用表情回应话题了 codex是不是降额度了 反馈关于 “快问快答”标签的乱象 opencode版本1.4.3 无法上传图片问题 想问一下怎么解决这个问题,就是终端太多? codex更新到0.120.0之后无法加载以前的会话 sub2api怎么部署? 分享一个自用的南京继续教育平台视频自动播放下一集的油猴脚本 zotero9出来了 Claude正在向我推销付费项目,那能让你轻易得逞嘛 甲骨文用脚本开出来4个2+12咋办啊佬们,我还是免费号 各个厂的coding plan lite都绝版了? claude code 20美金账户问题 联通元景套餐续费问题 ai时代下的一些思考(诚邀大家讨论) 出境易GPT订阅pro求助 今年到目前股市的操作。 刚收到短信之前跑路的那家可以兑换了 佬们都用境外服务器做什么呢? 甲骨文4+24 求助领pro时候报错-付款页面出错。请重试。如果问题依然存在,请访问help.openai.com。 cloudflare 浏览器渲染增加了 CDP与mcp支持 SUB2API 导入 rt 时报错显示 Request failed with status code 502 如何解决 讨论一下怎么整理笔记 codex0.120.0更新后无法启动,回退 0.119.0正常使用 冰佬的公益站也不行了吗 三角洲直接给我封了10年 有佬友知道怎么起诉么 88VIP邀请 经过排查大概确定反重力代理报错问题了 【求助】openrouter 今年4月用国内visa卡充值后导致封禁,无法使用外国模型 奥特曼家被炸 自用,高信息量回复收集 求助sub2api分组问题 【新人报道】注册成功了 分享100个codex free账号 招聘 深圳客户端开发(flutter) 20k+
codex computer-use插件无法正常使用解决方案指北【超详细】
Geo-ff (HorseMonkey) · 2026-06-01 · via LINUX DO - 最新话题

前段时间Codex桌面端推出了Windows系统的computer-use插件,相信很多平时用Windows开发的佬都去尝试了一下,我自己也用了一下,使用过程中遇到了一些问题,于是我在站内找解决方案,在此感谢各位佬提供的解决方案,我已成功解决并使用。
那下面呢我就根据我自己的解决过程和站内解决方案来汇总一下,方便后续遇到类似问题的佬一键直达问题根因和解决方法,减少心智负担 :clinking_glasses:


该插件的无法正常使用的情况主要分为两种:
:one:无法在设置页或插件页看到“computer-use”和“chrome”,即chrome插件和computer-use插件消失或状态异常。
ps:看下面的解决方案之前,先确认不是节点问题导致的插件消失。
一、为什么有“chrome”,不是探讨的“computer-use”插件嘛&问题根因是什么?
答:这与Codex的插件更新逻辑有关。Codex在更新插件时会先删除旧的临时目录.tmp,如果事先安装了chrome插件,那么这个目录中会包含chrome插件使用的native host,即extension-host.exe,我们都知道Windows系统会对正在运行的.exe 或其所在目录加锁,不允许删除,那么如果更新的时候chrome相关服务在使用,就会导致目录清理失败,留下一个不完整的目录,但Codex配置仍然指向这个半成品目录,所以就找不到正确的插件信息,也就更新失败了。
很多佬肯定尝试过重启Codex,但重启Codex时chrome服务可能仍然开着,这个进程没有可见窗口, Codex再次尝试重建.tmp目录时,又遇到文件锁,再次失败。
帮助理解:

image

二、如何解决?
以下内容为AI整理,以截图形式呈现(6月1日晚十点更新提示词,如果用了旧版提示词复发的佬友麻烦看新提示词,这个问题会产生的原因是codex的设计缺陷,目前的解法就是修改native host指向,从.tmp改为稳定版本目录,希望后面codex的更新能够修复这个问题吧 :melting_face:):

image

最后给出轮椅版本提示词:

你现在要在 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`。只有日志明确出现 `os error 740` / `请求的操作需要提升` 时,才另行判断是否需要改 `sandbox = "unelevated"`;本提示词处理的是文件锁和 bundled 插件缓存损坏。
4. 不要暴露、打印或复制任何 API key、登录 token、auth.json 内容。
5. 如果你当前无法直接执行 Windows PowerShell,请生成可运行的 `.ps1` 修复脚本放到桌面,并告诉我用 PowerShell 执行。

---

1. 先收集路径

在 Windows PowerShell 中设置这些变量:

$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
  }
}

$StateFile = Join-Path $BackupDir "pre-repair-state.txt"
@(
  "BackupDir=$BackupDir",
  "CodexHome=$CodexHome",
  "BundledTmpRoot=$BundledTmpRoot",
  "PluginCacheRoot=$PluginCacheRoot",
  "",
  "Processes:",
  (Get-Process extension-host,codex-computer-use -ErrorAction SilentlyContinue | Format-Table -AutoSize | Out-String),
  "",
  "Bundled tmp listing:",
  (if (Test-Path -LiteralPath $BundledTmpRoot) { Get-ChildItem -LiteralPath $BundledTmpRoot -Force -Recurse -ErrorAction SilentlyContinue | Select-Object -First 200 FullName,Length | Format-Table -AutoSize | Out-String } else { "missing" }),
  "",
  "Chrome cache listing:",
  (if (Test-Path -LiteralPath $ChromeCacheRoot) { Get-ChildItem -LiteralPath $ChromeCacheRoot -Force -ErrorAction SilentlyContinue | Format-Table -AutoSize | Out-String } else { "missing" }),
  "",
  "Computer Use cache listing:",
  (if (Test-Path -LiteralPath $ComputerUseCacheRoot) { Get-ChildItem -LiteralPath $ComputerUseCacheRoot -Force -ErrorAction SilentlyContinue | Format-Table -AutoSize | Out-String } else { "missing" })
) | Set-Content -LiteralPath $StateFile -Encoding UTF8

---

3. 判断是否属于 Windows 文件锁导致的 bundled 插件损坏

3.1 检查 Codex 插件状态

优先运行:

codex plugin marketplace list
codex plugin list

确认:

- `openai-bundled` marketplace 是否存在。
- `chrome@openai-bundled` 是否 installed / enabled。
- `computer-use@openai-bundled` 是否 installed / enabled。

如果 `codex` 命令因 WindowsApps alias 拒绝访问失败,请不要卡住,改为继续检查文件和日志。

3.2 检查 marketplace 文件和关键插件文件

Test-Path -LiteralPath $BundledMarketplaceJson
Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\chrome\.codex-plugin\plugin.json")
Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\chrome\scripts\browser-client.mjs")
Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\chrome\extension-host\windows\x64\extension-host.exe")
Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\computer-use\.codex-plugin\plugin.json")
Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\computer-use\scripts\computer-use-client.mjs")

如果 `marketplace.json` 缺失,或 `plugins\chrome` / `plugins\computer-use` 目录只有半截内容,说明 bundled marketplace 可能已损坏。

3.3 检查 latest 指向和缓存关键文件

$ChromeLatest = Join-Path $ChromeCacheRoot "latest"
$ComputerUseLatest = Join-Path $ComputerUseCacheRoot "latest"
Get-Item -LiteralPath $ChromeLatest -Force -ErrorAction SilentlyContinue | Format-List *
Get-Item -LiteralPath $ComputerUseLatest -Force -ErrorAction SilentlyContinue | Format-List *

Test-Path -LiteralPath (Join-Path $ChromeLatest "scripts\browser-client.mjs")
Test-Path -LiteralPath (Join-Path $ChromeLatest "extension-host\windows\x64\extension-host.exe")
Test-Path -LiteralPath (Join-Path $ComputerUseLatest "scripts\computer-use-client.mjs")
Test-Path -LiteralPath (Join-Path $ComputerUseLatest "node_modules\@oai\sky\bin\windows\codex-computer-use.exe")

异常特征:

- `latest` 指向 `%USERPROFILE%\.codex\.tmp\bundled-marketplaces\openai-bundled\plugins\chrome` 这类临时目录。
- 目标目录缺少 `scripts\browser-client.mjs`、`extension-host.exe`、`.codex-plugin\plugin.json`、插件图标等关键文件。

3.4 检查日志关键词

$LogRoots = @(
  (Join-Path $env:LOCALAPPDATA "Packages\OpenAI.Codex_2p2nqsd0c76g0\LocalCache\Local\Codex\Logs"),
  (Join-Path $CodexHome "sessions")
)

$Patterns = "EBUSY|resource busy or locked|plugin_cache_windows_file_lock|failed to back up plugin cache entry|failed to remove existing plugin cache entry|os error 5|拒绝访问|marketplace\.json.*does not exist|extension-host\\windows\\x64|Windows Computer Use helper paths are unavailable"

foreach ($root in $LogRoots) {
  if (Test-Path -LiteralPath $root) {
    Get-ChildItem -LiteralPath $root -Recurse -File -ErrorAction SilentlyContinue |
      Sort-Object LastWriteTime -Descending |
      Select-Object -First 80 |
      Select-String -Pattern $Patterns -AllMatches -ErrorAction SilentlyContinue |
      Select-Object Path,LineNumber,Line |
      Format-List
  }
}

如果同时满足下面多项,基本可以确认是本问题:

- 插件页报 `marketplace.json does not exist`。
- 图标不加载。
- `openai-bundled` 的 `.tmp\bundled-marketplaces` 目录缺文件。
- 日志出现 `EBUSY` / `resource busy or locked` / `plugin_cache_windows_file_lock` / `os error 5`。
- 锁相关路径涉及 `extension-host.exe` 或 `extension-host\windows\x64`。

如果主要错误是 `os error 740` / `请求的操作需要提升` / `windows sandbox failed: spawn setup refresh`,先停止本流程,改查 Windows sandbox 权限问题。

---

4. 如果确认是 Windows 文件锁导致的问题,执行修复

4.1 停止可能锁目录的残留进程

先提醒我关闭 Chrome。随后停止这些后台进程:

Get-Process extension-host -ErrorAction SilentlyContinue | Stop-Process -Force
Get-Process codex-computer-use -ErrorAction SilentlyContinue | Stop-Process -Force
Start-Sleep -Seconds 2

不要强杀当前 Codex Desktop 主进程,除非我明确同意;否则可能中断当前会话。

4.2 找到 Codex 安装包里的完整 openai-bundled 源

$BundledSource = $null
$PackageRoots = Get-ChildItem -LiteralPath (Join-Path $env:ProgramFiles "WindowsApps") -Directory -ErrorAction SilentlyContinue |
  Where-Object { $_.Name -like "OpenAI.Codex_*_x64__2p2nqsd0c76g0" } |
  Sort-Object LastWriteTime -Descending

foreach ($pkg in $PackageRoots) {
  $candidate = Join-Path $pkg.FullName "app\resources\plugins\openai-bundled"
  if (Test-Path -LiteralPath (Join-Path $candidate ".agents\plugins\marketplace.json")) {
    $BundledSource = $candidate
    break
  }
}

if (-not $BundledSource) {
  throw "找不到 Codex 安装包中的 openai-bundled 源目录,请先确认 Codex Desktop 已安装且 WindowsApps 可访问。"
}

"Bundled source: $BundledSource"

源目录必须包含:

Test-Path -LiteralPath (Join-Path $BundledSource ".agents\plugins\marketplace.json")
Test-Path -LiteralPath (Join-Path $BundledSource "plugins\chrome\.codex-plugin\plugin.json")
Test-Path -LiteralPath (Join-Path $BundledSource "plugins\computer-use\.codex-plugin\plugin.json")

4.3 读取插件版本

function Get-PluginVersion([string]$PluginDir) {
  $pluginJson = Join-Path $PluginDir ".codex-plugin\plugin.json"
  if (-not (Test-Path -LiteralPath $pluginJson)) {
    throw "缺少 plugin.json: $pluginJson"
  }
  $json = Get-Content -LiteralPath $pluginJson -Raw | ConvertFrom-Json
  if (-not $json.version) {
    throw "plugin.json 中缺少 version: $pluginJson"
  }
  return [string]$json.version
}

$ChromeVersion = Get-PluginVersion (Join-Path $BundledSource "plugins\chrome")
$ComputerUseVersion = Get-PluginVersion (Join-Path $BundledSource "plugins\computer-use")
"ChromeVersion=$ChromeVersion"
"ComputerUseVersion=$ComputerUseVersion"

4.4 重建损坏的 bundled marketplace

Get-Process extension-host -ErrorAction SilentlyContinue | Stop-Process -Force
Get-Process codex-computer-use -ErrorAction SilentlyContinue | Stop-Process -Force
Start-Sleep -Seconds 2

if (Test-Path -LiteralPath $BundledTmpRoot) {
  Remove-Item -LiteralPath $BundledTmpRoot -Recurse -Force -ErrorAction Stop
}

New-Item -ItemType Directory -Force -Path (Split-Path -Parent $BundledTmpRoot) | Out-Null
Copy-Item -LiteralPath $BundledSource -Destination $BundledTmpRoot -Recurse -Force

复制后校验:

Get-Content -LiteralPath $BundledMarketplaceJson -Raw | ConvertFrom-Json | Out-Null
Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\chrome\scripts\browser-client.mjs")
Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\chrome\extension-host\windows\x64\extension-host.exe")
Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\computer-use\scripts\computer-use-client.mjs")

4.5 重建 chrome / computer-use cache

$ChromeSource = Join-Path $BundledSource "plugins\chrome"
$ComputerUseSource = Join-Path $BundledSource "plugins\computer-use"
$ChromeVersionDir = Join-Path $ChromeCacheRoot $ChromeVersion
$ComputerUseVersionDir = Join-Path $ComputerUseCacheRoot $ComputerUseVersion

New-Item -ItemType Directory -Force -Path $ChromeCacheRoot | Out-Null
New-Item -ItemType Directory -Force -Path $ComputerUseCacheRoot | Out-Null

if (Test-Path -LiteralPath $ChromeVersionDir) {
  Remove-Item -LiteralPath $ChromeVersionDir -Recurse -Force
}
if (Test-Path -LiteralPath $ComputerUseVersionDir) {
  Remove-Item -LiteralPath $ComputerUseVersionDir -Recurse -Force
}

Copy-Item -LiteralPath $ChromeSource -Destination $ChromeVersionDir -Recurse -Force
Copy-Item -LiteralPath $ComputerUseSource -Destination $ComputerUseVersionDir -Recurse -Force

重建 latest,优先使用 junction;如果失败则复制成普通目录:

function Reset-Latest([string]$LatestPath, [string]$TargetPath) {
  if (Test-Path -LiteralPath $LatestPath) {
    Remove-Item -LiteralPath $LatestPath -Recurse -Force
  }
  cmd /c mklink /J "`"$LatestPath`"" "`"$TargetPath`"" | Out-Null
  if (-not (Test-Path -LiteralPath $LatestPath)) {
    Copy-Item -LiteralPath $TargetPath -Destination $LatestPath -Recurse -Force
  }
}

Reset-Latest (Join-Path $ChromeCacheRoot "latest") $ChromeVersionDir
Reset-Latest (Join-Path $ComputerUseCacheRoot "latest") $ComputerUseVersionDir

验证 latest 实际指向稳定版本目录,而不是 .tmp 或其他临时路径:

function Assert-LatestTarget([string]$LatestPath, [string]$ExpectedTarget) {
  $item = Get-Item -LiteralPath $LatestPath -Force -ErrorAction SilentlyContinue
  if (-not $item) {
    throw "latest 不存在: $LatestPath"
  }
  $actualTarget = $item.Target
  if (-not $actualTarget) {
    $keyFile = Join-Path $LatestPath "scripts"
    if (-not (Test-Path -LiteralPath $keyFile)) {
      throw "latest 是普通目录但缺少关键内容: $LatestPath"
    }
    "latest OK (plain dir): $LatestPath"
    return
  }
  if ($actualTarget -like "*\.tmp\bundled-marketplaces\*") {
    throw "latest 仍然指向 .tmp 临时目录,修复未生效: $actualTarget"
  }
  if ($actualTarget -like "*\chrome\latest*" -or $actualTarget -like "*\computer-use\latest*") {
    throw "latest 指向自身或循环引用: $actualTarget"
  }
  "latest OK (junction -> $actualTarget): $LatestPath"
}

Assert-LatestTarget (Join-Path $ChromeCacheRoot "latest") $ChromeVersionDir
Assert-LatestTarget (Join-Path $ComputerUseCacheRoot "latest") $ComputerUseVersionDir

校验关键文件:

$RequiredFiles = @(
  (Join-Path $ChromeVersionDir ".codex-plugin\plugin.json"),
  (Join-Path $ChromeVersionDir "scripts\browser-client.mjs"),
  (Join-Path $ChromeVersionDir "extension-host\windows\x64\extension-host.exe"),
  (Join-Path $ChromeVersionDir "assets\google-chrome.png"),
  (Join-Path $ComputerUseVersionDir ".codex-plugin\plugin.json"),
  (Join-Path $ComputerUseVersionDir "scripts\computer-use-client.mjs"),
  (Join-Path $ComputerUseVersionDir "node_modules\@oai\sky\bin\windows\codex-computer-use.exe"),
  (Join-Path $ComputerUseVersionDir "assets\app-icon.png")
)

$Missing = $RequiredFiles | Where-Object { -not (Test-Path -LiteralPath $_) }
if ($Missing.Count -gt 0) {
  throw "修复后仍缺少关键文件:`n$($Missing -join "`n")"
}

4.6 修复 Chrome native host JSON

$ExtensionHostExe = Join-Path $ChromeVersionDir "extension-host\windows\x64\extension-host.exe"
if (-not (Test-Path -LiteralPath $ExtensionHostExe)) {
  throw "找不到 extension-host.exe: $ExtensionHostExe"
}

function Write-JsonNoBom([string]$Path, $Object) {
  $jsonText = $Object | ConvertTo-Json -Depth 20
  [System.IO.File]::WriteAllText($Path, $jsonText, [System.Text.UTF8Encoding]::new($false))
}

foreach ($jsonPath in @($ExtensionManifest, $CodexNativeHosts, $LocalNativeHosts)) {
  if (-not (Test-Path -LiteralPath $jsonPath)) {
    continue
  }
  $obj = Get-Content -LiteralPath $jsonPath -Raw | ConvertFrom-Json
  $changed = $false

  if ($obj.path -and (($obj.path -like "*\chrome\latest\*") -or ($obj.path -like "*\.tmp\bundled-marketplaces\*"))) {
    $obj.path = $ExtensionHostExe
    $changed = $true
  }

  if ($changed) {
    Write-JsonNoBom $jsonPath $obj
  } else {
    Write-JsonNoBom $jsonPath $obj
  }
}

4.7 确认插件启用状态

检查 `$CodexHome\config.toml` 中是否存在这些插件配置。如果已经存在并 enabled,不要重复改:

[plugins."chrome@openai-bundled"]
enabled = true

[plugins."computer-use@openai-bundled"]
enabled = true

[plugins."browser@openai-bundled"]
enabled = true

如果插件缺失或 disabled,再备份后最小化修复。不要改模型 provider、API key、登录态或无关项目配置。

---

5. 最终验证

Get-Content -LiteralPath $BundledMarketplaceJson -Raw | ConvertFrom-Json | Out-Null

Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\chrome\assets\google-chrome.png")
Test-Path -LiteralPath (Join-Path $BundledTmpRoot "plugins\computer-use\assets\app-icon.png")
Test-Path -LiteralPath (Join-Path $ChromeCacheRoot "latest\scripts\browser-client.mjs")
Test-Path -LiteralPath (Join-Path $ChromeCacheRoot "latest\extension-host\windows\x64\extension-host.exe")
Test-Path -LiteralPath (Join-Path $ComputerUseCacheRoot "latest\scripts\computer-use-client.mjs")
Test-Path -LiteralPath (Join-Path $ComputerUseCacheRoot "latest\node_modules\@oai\sky\bin\windows\codex-computer-use.exe")

验证 native host JSON 不再指向 chrome\latest 或 .tmp:

foreach ($jsonPath in @($ExtensionManifest, $CodexNativeHosts, $LocalNativeHosts)) {
  if (-not (Test-Path -LiteralPath $jsonPath)) { continue }
  $content = Get-Content -LiteralPath $jsonPath -Raw
  if ($content -match [regex]::Escape("\chrome\latest\") -or $content -match [regex]::Escape("\.tmp\bundled-marketplaces\")) {
    throw "native host JSON 仍然指向不稳定路径: $jsonPath"
  }
  "NativeHost path OK: $jsonPath"
}

foreach ($jsonPath in @($ExtensionManifest, $CodexNativeHosts, $LocalNativeHosts)) {
  if (Test-Path -LiteralPath $jsonPath) {
    Get-Content -LiteralPath $jsonPath -Raw | ConvertFrom-Json | Out-Null"JSON OK: $jsonPath"
  }
}

如果可用,再运行:

codex plugin marketplace list
codex plugin list

重启 Codex Desktop 后,确认:

- 插件页可以打开 `Chrome` 和 `Computer Use`。
- 插件图标恢复。
- `computer-use@openai-bundled` 和 `chrome@openai-bundled` 是 installed / enabled。
- 设置页 Computer Use 不再显示 unavailable。

---

6. 最终回复要求

请最后告诉我:

1. 是否确认这是 Windows 文件锁导致的 bundled 插件半更新。
2. 证据是什么,例如日志中的 `EBUSY` / `plugin_cache_windows_file_lock` / `os error 5` / `marketplace.json does not exist`。
3. 备份目录在哪里。
4. 实际改了哪些文件或目录。
5. 哪些验证通过。
6. 如果没有修复,请明确卡在哪一步,不要假装已修好。

或者参考更泛用的提示词,链接:


:two:插件可见,但是不可用,报错关键词为:

node_repl kernel exited unexpectedly
windows sandbox failed: spawn setup refresh
setup refresh: failed to spawn ... codex-windows-sandbox-setup.exe: 请求的操作需要提升。 (os error 740)

这种情况的解决方案比较清晰,指路:

希望能帮到遇到同样问题的佬 :clinking_glasses:

ryker_amparo (ryker amparo) 2

感谢佬,这几天一直碰到这个问题,让codex修也修不好,总是反弹!用了这套方案解决掉了

MarkHk (Mark) 3

好贴!给楼主猛猛赞了,待我晚上回家后试试看:saluting_face:

zyf (Kosjd) 4

实测好用啊,之前还没发现插件有问题呢

meteorCT (meteor) 5

:joy: 看了一圈都是windows的方案,看来我intel-mac computer-use插件的问题是没人管了

Haohuai (好坏) 6

同是intel-mac,已急哭 :joy:

klylw520 (klylw520) 7

这个问题今天刚遇到,上午正常使用,下午就不行了,直接截图权限给满,让codex自己给修复成功了

Arbonkeep (Arbonkeep) 8

佬我想问一下你这流程图用什么工具画的 挺好

Geo-ff (HorseMonkey) 9

佬 这个是svg绘制的,很简单的学术风格的svg

Geo-ff (HorseMonkey) 10

是的佬 一般情况下codex自己就能查目录解决问题

Geo-ff (HorseMonkey) 11

问一下佬遇到的哪种情况?插件不可见也不可用吗?

看到这个 扩展主机进程 我都要笑了

咱干脆做到VSCode里吧 hh

fargolee (Fargolee) 13

我是微软商店下载安装到D盘,后面应用移动到C盘就正常显示使用computer-use

meteorCT (meteor) 14

是的,computer-use不可见也不可用,同时“锁屏操作”功能无法打开会提示“无法更新“锁定操作”设置”。 让codex自己去解决这小子说: “结论有点扎心但很清楚:不是你设置错了,也不是你没下载对 Codex 主程序,而是 Intel Mac 版本目前确实有公开反馈:Computer Use 插件/辅助程序缺失或不可用。” ,让我等版本更新 :face_with_peeking_eye:

Geo-ff (HorseMonkey) 15

建议佬让codex去找官方github的issue下有没有相同情况,看看有没有合适的解决方案

mac站内之前我记得也有讨论 善用搜索功能
包括github issue讨论

Arbonkeep (Arbonkeep) 17

知道是svg 我的意思是有没有用ai绘图工具之类的。还是说ai理解逻辑直接输出的svg

Geo-ff (HorseMonkey) 18

用的claude opus6直接绘制的佬,限制词只有“学术风格”

bzyy2w (jack_bzyy) 19

从昨天晚上到现在,让他自己修复这个问题,直接修崩了两次,基础功能都用不了了,现在还在修复 :rofl:

mabuli 20

太细致啦,这种记录和分享的态度太棒了