fix(server): Codex sessions can use the OpenAI Chrome plugin again #34704
main fromrefs/pull/34704/head·opened View on GitHubProblem#
Since Chrome plugin 26.1023, Codex threads started from T3 can't use the OpenAI Chrome/browser plugin. cua.listBrowsers() and cua.getState() fail with The browser access host is unavailable, and agents fall back to Allow prompts, bringing Chrome to the foreground, or Computer Use. The same plugin works in sessions the Codex desktop app starts. Reported in #26098 and #26756 (macOS, Windows), with more reports after the duplicate closure, and in #27083 (Linux).
The plugin's browser service now needs BROWSER_USE_ACCESS_PIPE_PATH, _EXECUTOR_ID and _VERIFYING_IDENTITY. Before each turn it asks the host on that pipe whether the turn may use the browser, and it accepts only a signed answer. T3 never sets these variables. A T3 launched by the desktop app can pass that app's values to Codex, and that app refuses sessions it didn't start (#27083).
Change#
Each Codex session T3 starts now runs its own browser-access host for the lifetime of the session. Codex already talks to T3 over the app-server protocol; this adds a second channel that the plugin uses:
CodexBrowserAccessHostlistens on an owner-only Unix socket (inside a fresh0700directory) or a random named pipe. It creates a new Ed25519 key and executor ID for each session and hands them tocodex app-server. It reads the plugin's native frame (length prefix, then JSON-RPCbrowser/access), and signs thecodex.browserAccess.v1decision the plugin verifies. It rejects malformed or oversized frames without replying, and it closes the listener and removes the socket directory when the session ends.CodexAdapterV2allows a request only when:- its executor ID is this session's,
- its turn is running in this session (a subagent's turn counts under its root session), and
- the thread's existing agent browser-access setting (
browserToolsAvailable) allows it.
Values passed down from a parent process are always replaced, so an inherited host from another app is never used. If the host can't start (including key generation), the variables are set to empty and the session continues without browser access.
The owner-only socket/pipe setup is moved out of
CodexManagedTokenBrokerintoprivateIpcEndpoint.ts, unchanged, and both listeners use it.
On the maintainer's comment on #26756: this does not copy or reuse another process's identity or access decision. T3 is the process that hosts these Codex sessions, and it uses its own key to approve only turns it is running, under T3's own browser-access setting. The plugin still checks the signature on every decision. The variables are the same ones the desktop app sets for the sessions it hosts. OpenAI hasn't documented this protocol for other app-server hosts yet (openai/codex#57641), so the plugin could change it. If it does, the plugin just reports the host as unavailable again, as it does today.
Project-level browser-access overrides depend on #31412. Without it, a project override still fails closed, so this PR follows the global setting until #31412 lands.
Scope and approval#
This fixes #26098 / #26756, which maintainers triaged as an upstream limitation. The objection there was to copying another process's identity, and this change doesn't do that. If you'd rather handle it differently or wait for OpenAI, I'm happy to move this to a discussion. It changes no UI, settings, dependencies or public API, and doesn't touch prompts.
Verification#
Reproduced on main: the new adapter regression test fails on the base commit. The plugin gets no host, and an inherited host identity is passed through.
Focused tests, 382 passed after rebasing on current
main:vp test run src/provider/CodexBrowserAccessHost.test.ts src/orchestration-v2/Adapters/CodexAdapterV2.test.ts src/orchestration-v2/ProviderSessionManager.test.ts src/orchestration-v2/runtimeLayer.test.tsThe adapter test drives a replayed Codex session and asks the host over its real socket, the way the plugin does. It covers:
- signature verification of every decision against the published identity,
- denial for a foreign executor ID, a wrong session, a finished turn, and cleared or withdrawn browser access, then allowing again once access is restored,
- a
0700socket directory that is removed on close (host test), - replacement of inherited
BROWSER_USE_ACCESS_*values.
Other checks:
vp run check:changedpasses format, lint, knip, graphql, typecheck and tests.Live, macOS 27, dev desktop build: OpenAI Chrome plugin 26.1029.61003 and Chrome 157, with a real Codex turn in T3 Code (Dev) against the signed-in Chrome profile.
- The agent opened its own tab, read the DOM, clicked, filled a field and read the value back, then closed its tab.
- Chrome stayed in the background throughout, with no Allow or foreground prompt and no Computer Use fallback.
- Turning browser access off made the same request fail before any browser access. Turning it back on in a fresh session made it work again, including reconnecting after a browser reset.
- I also tested my own signed-in Chrome workflows by hand on that build.
Not checked: Windows named pipes and Linux in a live session (the pipe and socket paths are covered by unit tests only), and native Codex subagent turns in a live session. The live runs used this change plus the layer fix that #31412 covers, on a base a day older than this branch. The rebased branch is covered by the focused tests above.
Implementation: Claude Opus 5.5 via Claude Code
- 1
- 2
Pushedf018f1b
Note
Written by
gpt-6.1-solon behalf of MariaVerified in a real dev environment#
linux boat vm, real dev web app driven with repository playwright and
/usr/bin/google-chrome, real codexgpt-6.1-solturns through the local proxy. projects and threads were created through the app, with no mocks or seeded data.github/mainatd6c1d17793: the real provider turn received none of the threeBROWSER_USE_ACCESS_*variables.- exact pr head
93e56bf07c: all three variables reached the real provider. the live unix socket signed valid decisions, allowed its running turn, and denied a foreign executor, session, turn, and a completed turn. socket mode was0600, directory0700. ordinary shell tools and follow-up turns worked. - found a real failure: switching agent browser access off left existing threads authorized, including their subsequent turns. a newly created thread correctly denied access.
- fixed in
bf23d4c958: the host now asks the session manager for current permission on each request. the existing regression case failed before this fix and passed afterward. re-running the real app showedtrue -> false -> truewhen changing the setting during the same real codex turn. the completed turn was denied afterward. - blacksmith
vp run check:changed FETCH_HEADpassed format, lint, knip, graphql, typechecks for 27 affected packages, and 237 tests.FETCH_HEADwas fetched from upstream main inside the worker to supply its missing history.
short transcript from a protocol client connected directly to the socket owned by the running codex session (not the chrome plugin):
original head, existing thread after access off: running, allowed=true, signature valid fixed head, access on: running, allowed=true, signature valid fixed head, access off: running, allowed=false, signature valid fixed head, access restored: running, allowed=true, signature valid fixed head, turn completed: completed, allowed=false, signature validmain, matching provider prompt:

pr, matching provider prompt:

real app permission toggle during the live authorization check; the signed outcomes are in the transcript above. recording shown as an animated gif for github compatibility. the original mp4 playback and seeking were also checked:

Not verified#
this vm has no native openai chrome plugin, and the real codex session has no
cua.listBrowserstool. the reported plugin error itself could not be reproduced on main, and successful plugin browsing cannot be claimed on the pr. direct socket verification proves the server authorization behavior only.macos/windows desktop integration, windows named pipes, native ios/android clients, native codex subagent turns, and project overrides were not exercised. the existing project-override dependency remains outside this fix.
Verified
bf23d4con Windows 11 (Codex + Edge extension):- Unit test (native Windows):
CodexAdapterV2.test.ts -t "browser plugin's access check"passes (1 passed, 161 skipped). - Same-thread dynamic toggle (
true -> false -> true, no server restart):- Turn 1 (
true):cua.listBrowsers()discovered Edge and completed form fill + click readback (CLICKED:DYNAMIC_ON_1). - Turn 2 (
false, same thread) viaserver.updateSettings: immediately denied withLocal browser access is unavailable for this chat. - Turn 3 (
true, same thread):CodexBrowserAccessHostallowedcua.listBrowsers()again without the unavailability error (it returned[]because the Edge extension had disconnected on the machine by that point).
- Turn 1 (
- Native
spawn_agentsubagents:false: the spawned subagent hitLocal browser access is unavailable for this chaton bothcua.getState()andcua.listBrowsers().true: the spawned subagent passed the access check and rancua.listBrowsers()without the unavailability error (also returning[]due to the same disconnected Edge extension, confirmed with a fresh single-turn baseline probe that returned[]as well).
- Unit test (native Windows):
Still seen on T3 0.1.9 on macOS: T3-spawned Codex workers cannot use the ChatGPT-for-Chrome browser API and receive exactly
The browser access host is unavailable.In the inspected launch contexts,
BROWSER_USE_ACCESS_PIPE_PATHandBROWSER_USE_ACCESS_VERIFYING_IDENTITYwere absent from the T3 Codex parent and its computer-use worker, while present in app-launched Codex workers. Only variable names and presence were compared; no identity or credential values were printed or copied. Installed browser-service code raises this error before socket I/O when the required app-issued context is missing. Extension-enabled and native-messaging-manifest diagnostics can pass despite this missing session context.A fresh T3 child reproduced the browser API error. Native desktop accessibility access worked from fresh workers, but that is a separate route and does not establish browser API recovery. No restart, reinstall or binary substitution was demonstrated to repair the browser launch context.
Request: a supported T3/Codex integration that provisions browser access for T3-spawned sessions with explicit permission and lifecycle handling. Please document the supported ownership boundary if this needs an upstream app/provider change. #34704 appears related; I have not validated that PR's implementation or compatibility, and this is not an endorsement of an unofficial access-host implementation. This report requests supported integration and does not propose copying or reusing another process's identity.
Acceptance: a fresh authorized T3 Codex child can enumerate and use an allowed Chrome tab through the browser API; denied or withdrawn access remains denied, and renewed sessions receive valid supported access context. No private browser contents or account details are needed for that check.
also hitting this on macOS 27.2 with T3 Code and Codex CLI 0.169.1. Chrome is running, the extension is installed and enabled, and the native-host manifest checks pass. i’ve reinstalled the extension multiple times, but browser discovery still fails with
The browser access host is unavailable.we checked the running MCP processes: the T3-launched ones are missing
BROWSER_USE_ACCESS_PIPE_PATHandBROWSER_USE_ACCESS_VERIFYING_IDENTITY, while those variables are present in the ChatGPT desktop-launched processes. only presence was checked; no values were copied or changed.haven’t tested this PR’s fix yet, but wanted to add another macOS reproduction. would really appreciate getting this working in T3.
Reproduced on macOS with T3 Nightly
0.1.14-nightly.20261129.5438. The official Chrome extension works in Codex Desktop but returnsThe browser access host is unavailablein T3. Would you review a rebased PR that preserves project-level browser permissions, or is T3 waiting for a supported OpenAI interface in openai/codex#57641?
Sign in to join this conversation.
Tested
93e56bfagainst9efd960on Windows 11 Home (x64,10.0.26200) with a running Microsoft Edge session (official Edge extension1.26.1021.11019, Codex0.167.0-alpha.4.1).On
9efd960,cua.listBrowsers()failed withThe browser access host is unavailable. On this PR:cua.listBrowsers()detects Edge (type=extension,family=edge).active=false) in the existing Edge window and runningsetValue/click/ readback /closeall worked without taking focus away from the maximized window or switching the active tab.enableAgentBrowserAccessoff blocks new sessions as expected (Local browser access is unavailable for this chat).Note that this was tested with a
vp packserver build rather than the packaged Electron app, and didn't cover per-project overrides or native Codex subagents.