Codex Desktop on Windows: Chrome native host locks plugin cache and Chrome routing is unreliable
Summary
I am seeing two related reliability problems with the Codex Desktop Chrome/browser plugin flow on Windows:
- The Chrome Native Messaging host appears to run from the mutable Codex bundled plugin cache. When Chrome launches the native host, Windows locks the running
.exe, and Codex later fails bundled plugin reconciliation withplugin_cache_windows_file_lock/os error 5. - Even when the Chrome extension is installed and usable, models sometimes fail to route to the Chrome plugin after the user explicitly requests Chrome/plugin usage. The model may look for a direct
chrometool, fall back to screenshots or another browser backend, and only use Chrome correctly after repeated prompting or restart.
Environment
- Product: Codex Desktop App on Windows
- Codex Desktop package observed:
OpenAI.Codex_26.519.5221.0_x64__2p2nqsd0c76g0 - App/plugin log version annotation observed:
26.519.41501 - Chrome extension installed and enabled
- Chrome running during the issue
- User-level Chrome Native Messaging host registry entry existed for the Codex extension
Issue 1: Native host file lock during plugin cache reconciliation
The Chrome Native Messaging manifest appears to point the native host executable into the Codex bundled plugin cache, specifically under the openai-bundled/chrome/latest/extension-host/windows/x64/extension-host.exe cache tree.
On Windows, a running executable is locked. When Chrome launches this native host via Native Messaging, the executable remains in use. Codex then attempts to install, remove, back up, or reconcile the bundled Chrome/browser plugin cache and fails because the executable or its parent cache tree is locked.
Representative log excerpts:
bundled_plugins_marketplace_install_failed
bundledPluginSourcePath=./plugins/chrome
errorCategory=plugin_cache_windows_file_lock
errorMessage="failed to install plugin: failed to back up plugin cache entry: Access is denied. (os error 5)"
bundled_plugins_reconcile_failed
errorMessage="failed to install plugin: failed to back up plugin cache entry: Access is denied. (os error 5)"
A related browser plugin cache failure was also observed:
bundledPluginSourcePath=./plugins/browser
errorCategory=plugin_cache_windows_file_lock
errorMessage="failed to uninstall plugin: failed to remove existing plugin cache entry: Access is denied. (os error 5)"
This repeated across multiple app sessions. Directory permission checks indicated the user account had full control over the relevant cache directory, so this looks more like a Windows executable file lock than a normal ACL permission problem.
Killing stale helpers temporarily stopped new file-lock errors, but the problem later recurred when Chrome relaunched the native host. That suggests the root issue is not only stale processes; it is that the registered Native Messaging host path points into a mutable cache entry.
User-visible impact of Issue 1
- Chrome plugin features feel unreliable.
- Codex repeatedly logs plugin reconcile/install failures.
- Chrome native messaging helper processes can remain running after Codex is closed.
- Restarting Codex does not necessarily clear the issue because Chrome can relaunch the native host.
- Codex can leave behind orphaned helper processes.
- Codex sessions/windows may feel unstable or restart-like, although no native crash report was confirmed in this inspection.
Expected behavior for Issue 1
Codex should be able to reconcile bundled plugins without failing because Chrome is using the Native Messaging host.
The Chrome Native Messaging host should not be registered to a path inside a mutable plugin cache that the app later backs up, removes, or replaces.
Suggested fixes for Issue 1
- Install the Chrome Native Messaging host executable into a stable, non-cache location.
- Register the Native Messaging manifest to that stable path, not to
openai-bundled/chrome/latest/...inside the mutable plugin cache. - Avoid using a mutable
latestreparse/symlink-style target as the executable path for Chrome Native Messaging. - If the native host must be versioned, install new versions side by side, atomically update the manifest, and defer deletion of old locked executables until they are no longer running.
- Detect active native host processes before plugin cache reconciliation and provide a user-facing recovery path.
Issue 2: Chrome plugin routing is unreliable from the model side
The user experience is that explicit Chrome plugin requests are not always honored by the model/tooling path.
Even when setup appears correct:
- Chrome is installed and running.
- The Codex Chrome Extension is installed and enabled.
- The Native Messaging host exists.
- The extension can be reached later in the same session.
The assistant may still fail to use Chrome at first. In one affected session, the user explicitly invoked the Chrome plugin link, but the assistant reported that it did not have a direct Chrome tool and used a desktop screenshot fallback instead. Later in the same session, after retry/restart, the assistant successfully connected to Chrome through the browser-client / Node REPL flow and opened authenticated Chrome pages. This suggests a model-facing routing or entry-point reliability issue, not simply a missing user installation.
Evidence from local skill/tooling shape
The local Chrome skill trigger appears narrow, centered on @chrome. Users may naturally say things like:
use Chrome
use the Chrome plugin
use my logged-in Chrome
use the Codex Chrome Extension
current Chrome tab
These are explicit Chrome requests, but may not reliably route the model into the Chrome skill.
The operational entry point is also fairly indirect. The model does not appear to get a simple first-class chrome.openTabs / chrome.status / chrome.newTab style tool. Instead, the model has to discover or remember a flow similar to:
load/read the Chrome skill
use the Node REPL JavaScript tool
import the plugin browser-client module
run setupBrowserRuntime(...)
select the extension browser backend
claim or create a tab
clean up/finalize tabs afterward
That is a fragile model-facing path and gives a plausible mechanism for the observed behavior where explicit Chrome requests are missed or routed to the wrong backend.
User-visible impact of Issue 2
- User explicitly asks for Chrome plugin use, but the assistant may not use it.
- Assistant may claim it cannot find the Chrome entry point.
- Assistant may use a screenshot fallback, in-app browser, or another browser backend.
- User must repeatedly remind the model to use Chrome.
- The feature feels unstable even when installation is correct.
Expected behavior for Issue 2
When the user explicitly mentions Chrome, Chrome plugin, Codex Chrome Extension, logged-in Chrome, existing Chrome tabs, or authenticated Chrome state, the model should reliably route to the Chrome plugin.
A robust model-facing path would be:
If user requests Chrome/Codex Chrome Extension/authenticated Chrome/current Chrome tab:
1. Load Chrome skill.
2. Run a lightweight connection check.
3. If connection works, use the extension backend.
4. If connection fails, run documented checks and report the exact failing component.
Suggested fixes for Issue 2
- Broaden the Chrome skill trigger beyond only
@chrometo include natural-language requests for Chrome, the Chrome plugin, the Codex Chrome Extension, current Chrome tabs, logged-in Chrome, existing Chrome tabs, Chrome profile/session/cookies, etc. - Expose a first-class Chrome tool or clearer tool alias, even if it wraps the existing browser-client / Node REPL flow internally.
- Put a short "do this first" section at the top of the Chrome skill.
- Separate routing/setup/API/troubleshooting documentation so the critical entry path is hard to miss.
- Improve diagnostics when the extension is installed but communication is unstable, especially when the native host is running from a mutable plugin cache.
Minimal reproduction for Issue 1
- Install Codex Desktop on Windows.
- Install and enable the Codex Chrome Extension.
- Confirm the Chrome Native Messaging host points to the bundled Chrome plugin cache under
openai-bundled/chrome/latest/extension-host/windows/x64/extension-host.exe. - Open Chrome and use the Codex Chrome Extension so the native host is running.
- Start/restart Codex Desktop and allow bundled plugins to reconcile.
- Observe repeated
plugin_cache_windows_file_lock/os error 5plugin cache warnings.
Minimal reproduction for Issue 2
- Ensure Chrome, Codex Chrome Extension, and Native Messaging host are installed correctly.
- In Codex, ask the assistant in natural language to use the Chrome plugin, for example:
Use the Chrome plugin to inspect my current Chrome tab. - Observe that the assistant may fail to route to Chrome, may look for a wrong entry point, may use another browser backend, or may require repeated reminders before using Chrome correctly.
Requested outcome
Please fix the Chrome plugin architecture so the native host is not run from a mutable plugin cache path, and improve the model-facing Chrome skill/tool entry point so explicit Chrome plugin requests are reliably honored.
I can provide more detailed local evidence privately if maintainers need it, but I am avoiding public raw session excerpts and local workspace details in this issue.
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for the duplicate detection. I reviewed the linked issues (#23831, #22849, #23322, and #22888).
This issue appears related, but not a full duplicate. It includes a specific Windows file-lock failure mode where the Chrome Native Messaging host is registered to and launched from the mutable Codex plugin cache path, under
openai-bundled/chrome/latest/extension-host/windows/x64/extension-host.exe. When Chrome launches that native host, Windows locks the running executable, and Codex later fails bundled plugin reconciliation withplugin_cache_windows_file_lock/os error 5.It also combines that native-host/cache lifecycle issue with a separate model/tool-routing problem: explicit Chrome plugin requests can fail to route into the Chrome skill/tool path even when the Chrome extension and native host are installed and later prove usable.
So I believe the linked issues are useful related context, but this issue should stay open unless maintainers decide it is covered by a more specific tracking issue.
Additional update: Windows update/reconcile failure can leave bundled plugins partially broken
I hit this again on a newer Codex Desktop build, and this time the failure had a broader user-visible impact than just Chrome routing.
Environment observed
OpenAI.Codex_26.601.2237.0_x64__2p2nqsd0c76g026.601.21317What happened
After updating/restarting Codex Desktop, the bundled plugin reconcile flow failed on the Chrome plugin cache with a Windows file-lock / access-denied error. After that partial failure, the app state was inconsistent enough that Computer Use also failed to start because its helper path was unavailable.
Representative sanitized log excerpts:
Immediately after the plugin reconcile failure, Computer Use could not resolve its helper path:
After manually rebuilding the bundled plugin mirror/cache back to the same default locations that Codex normally uses, both plugins recovered:
Functional verification after recovery:
https://example.com/, read the page title/body, and capture a screenshot.Why this matters
This looks like the same underlying Chrome native-host/cache lifecycle issue described above, but the consequence is larger than Chrome alone:
So the current failure mode is not merely: "Chrome plugin is unreliable." It can become: "Codex bundled plugin reconciliation leaves the whole bundled plugin set in an inconsistent state after an update."
Reasonable fixes
I think the fix should be in the update/reconcile lifecycle, not in user workarounds:
extension-host.exefrom the target cache tree and either wait, ask the user to close Chrome, or skip destructive cache replacement until safe.%USERPROFILE%\.codex\.tmp\bundled-marketplaces\openai-bundledand%USERPROFILE%\.codex\plugins\cache\openai-bundledfrom the installed official bundled source when the app detects missing helper paths or partial cache state.The important point: manually rebuilding the official bundled mirror/cache restored functionality without any custom runtime path, so the expected default structure is fine. The bug is that the official update/reconcile process can fail under Windows file locks and leave that default structure incomplete.
I can reproduce a related but slightly different failure mode on Windows with Codex Desktop 26.609.x.
In my case the Native Messaging registration is no longer missing: the HKCU registry key exists, the manifest exists, and Chrome has launched
extension-host.exe, but the Codex browser runtime still does not expose the Chrome extension backend.Environment observed:
OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0openai-bundled/chrome/26.609.411141.1.5hehggadaopoacecdllhhajmbjkdcmajgcom.openai.codexextensionNative Messaging state:
HKCU\Software\Google\Chrome\NativeMessagingHosts\com.openai.codexextension%LOCALAPPDATA%\OpenAI\extension\com.openai.codexextension.jsonname:com.openai.codexextensionallowed_origins:chrome-extension://hehggadaopoacecdllhhajmbjkdcmajg/path:%USERPROFILE%\.codex\plugins\cache\openai-bundled\chrome\latest\extension-host\windows\x64\extension-host.exelatestis a junction to the current plugin version.extension-host.exeexists and is running.extension-host.exe chrome-extension://hehggadaopoacecdllhhajmbjkdcmajg/ --parent-window=0However, after initializing the bundled Chrome browser-client runtime:
The only discovered backend is the Codex in-app browser:
These all fail:
Opening the selected Chrome profile with the bundled recovery helper also does not fix it:
After waiting and retrying,
agent.browsers.list()still only returnsiab.One extra diagnostic issue: on this Chinese Windows environment,
scripts/check-native-host-manifest.js --jsoncan falsely report that the registry key is missing. The reason appears to be that Node'sexecFile("reg", ["query", key, "/ve"], { encoding: "utf8" })receives a localized/default-value label as mojibake:The checker only parses
(Default), so it returnsregistryManifestPath: nulleven though PowerShell and rawreg queryshow that the key exists.So there seem to be two separate problems:
extension-host.exeis running, the Codex browser runtime may still fail to discover/expose the Chrome extension backend and only exposesiab.Expected behavior:
agent.browsers.list()should include the Chrome extension backend.agent.browsers.get("extension")or the documented Chrome plugin path should work.Still reproducible on a substantially newer Windows Codex Desktop build.
Environment:
OpenAI.Codex_26.707.9981.0_x64__2p2nqsd0c76g026.707.72221chrome@openai-bundledObserved removal sequence:
Failed to uninstall plugin.This happens with both the canonical identifierchrome@openai-bundledand the user-facing nameChrome, including after restarting Codex.openai-bundled/chrome/26.707.72221/extension-host/windows/x64/extension-host.exewith Windows access denied.
extension-host.exe, launched through theopenai-bundled/chrome/latest/...path.openai-bundled/chromedirectory out of the active cache path also fails with access denied while Codex is running.plugin-backup-*directories containing Chrome plugin backups were present from earlier failed operations.This confirms the native-host/mutable-cache lock and adds a removal-specific problem: the app respawns the process that blocks its own uninstaller, while returning no actionable error to the user. A robust uninstall likely needs to disable native-host respawn first, terminate the matching host, remove or defer-delete the cache, and then clean stale backup directories.
Additional reproduction: uninstall failure and startup auto-reinstall are coupled by Chrome-extension sync
I can still reproduce this on Windows in the Codex Desktop 26.721 line:
10.0.26200.026.721.4979.0; current package after restart/update is26.721.11231.0chrome@openai-bundled26.721.41059150.0.7871.187hehggadaopoacecdllhhajmbjkdcmajgObserved sequence
``
text
``failed to uninstall plugin: failed to remove existing plugin cache entry: Access is denied. (os error 5)
errorCategory=plugin_cache_windows_file_lock
``
text
``%USERPROFILE%\.codex\plugins\cache\openai-bundled\chrome\latest\extension-host\windows\x64\extension-host.exe
``
text
``bundled_plugin_chrome_extension_sync_decision
chromeExtensionSyncAction=keep_installed
isExtensionInstalled=true
isPluginSyncManaged=true
followed by
bundled_plugin_install_requestedandplugin_install_succeeded.``
text
``bundled_plugin_chrome_extension_sync_decision
chromeExtensionSyncAction=uninstall_managed
isExtensionInstalled=false
isPluginSyncManaged=true
bundled_plugin_uninstall_requested reason=chrome_extension_uninstalled
plugin_uninstall_succeeded
not_installed, with the plugin cache, native-host registration/manifest, and sync-management marker all absent.Interpretation
There appear to be two coupled behaviors:
This explains why the UI uninstall fails and why a manual cache cleanup can appear to “undo itself” after restarting Codex.
Expected behavior / suggestions
Disclosure: I maintain WinBridge Recovery, an independent Windows recovery utility for Codex Desktop.
This issue is directly relevant to the project because the native-host lock and the broken state left after reconciliation need to be treated as two separate problems. A running
extension-host.exe(and sometimes Codex-owned Node workers) can block cache replacement; after that failure,latest, the versioned cache, marketplace metadata and native-host registration can disagree even after the lock is gone.WinBridge Recovery focuses on that recoverable local-state layer: resolve the currently installed official Codex package, validate the versioned plugin cache and active pointers/registration, create a rollback backup, and rebuild only the inconsistent user-side pieces. It deliberately does not take ownership of WindowsApps or try to defeat an active Windows file lock.
For an active lock, the safer sequence is to identify/quiesce the plugin-owned host/workers first, then repair and verify the cache/pointers/registration. The model/tool-routing portion of this issue is also outside what a local recovery utility can guarantee; if the local Chrome bridge is healthy but the session still does not receive the tool, that remains an upstream runtime/routing problem.
This problem is still occurring on Windows.
The official Codex Chrome extension is installed, enabled, and shows “Connected,” but Codex still cannot discover, read, or control Chrome tabs.
Troubleshooting already completed:
The failure still occurs. The current runtime error is:
Trusted RPC dependency must resolve within a configured trusted code path
The error points to the bundled browser-service.mjs component. For privacy, I am not posting the full local file path.
Related diagnostic feedback ID:
01a00a63-9522-74a2-a718-9b2f7d64e0b2
Please link that diagnostic upload to this issue and advise whether a fix or additional supported diagnostic step is available.