codex icon indicating copy to clipboard operation
codex copied to clipboard

Codex Desktop 26.820.60940: Chrome and Edge navigation consistently times out

Open luoyeai opened this issue 3 months ago • 5 comments

What version of the Codex App are you using (From “About Codex” dialog)?

26.820.60940

What subscription do you have?

Pro

What platform is your computer?

No response

What issue are you seeing?

Product: Codex Desktop for macOS

Codex version: 26.820.60940, build 7119

Affected browsers:

  • Google Chrome 151.0.7922.174
  • Microsoft Edge 151.0.4129.107

Browser extensions:

  • Chrome extension: 1.2.27268.51612
  • Edge extension: 1.2.30001.51613

Issue: Codex can connect to both Chrome and Microsoft Edge and successfully create an about:blank tab. However, every navigation request hangs and times out after approximately 30 seconds. DOM reading cannot proceed after the timeout.

The issue occurs in a fresh, sequential, single-task test. Browser concurrency is not required to reproduce it.

Steps to reproduce:

  1. Fully quit Codex, Chrome, and Microsoft Edge.
  2. Start Codex Desktop.
  3. Ask Codex to use Chrome.
  4. Create a new browser tab.
  5. Navigate to https://example.com/
  6. The blank tab is created successfully, but navigation times out after 30 seconds.
  7. Repeat with Microsoft Edge; the same timeout occurs.

Expected result: The browser should navigate to example.com and Codex should be able to read the page title and DOM.

Actual result: Navigation hangs for 30 seconds and returns: "js execution timed out; kernel reset, rerun your request"

After the timeout:

  • Reconnecting to clean up the browser tab also times out.
  • A child "codex app-server --listen stdio://" process remains running.
  • The stale process has to be terminated or Codex has to be fully restarted.

Diagnostics already completed:

  • Both browser extensions are installed and enabled.
  • Native Messaging manifests exist and contain the correct extension origins.
  • Browser discovery and blank-tab creation work.
  • Direct network request to https://example.com/ returns HTTP 200 in about 0.67 seconds.
  • Therefore this is not caused by DNS, website availability, or general network latency.
  • Reinstalling the browser extensions multiple times does not resolve the issue.
  • Updating Codex from 26.818.61809 to 26.820.60940 does not resolve the issue.
  • The Chrome and Edge extension background scripts have the same SHA-256: 620aaf4c1315c1590318ec3783a2ce823002111b4da90797df6390ada3276c0c

Suspected component: The failure appears to be in the Codex browser bridge/navigation request lifecycle or in compatibility between the updated Codex browser plugin and the existing Chrome/Edge extensions. The extension discovery/control plane works, but navigation and DOM operations hang, and timeout cleanup leaves a stale app-server process.

Reproduction time: August 26, 2026, approximately 13:36–13:40, Asia/Shanghai timezone.

Impact: This blocks automated browser navigation, DOM inspection, responsive testing, and visual QA in both Chrome and Microsoft Edge.

What steps can reproduce the bug?

Environment

  • Codex Desktop: 26.820.60940 (build 7119)
  • Platform: macOS, Apple Silicon / arm64
  • Google Chrome: 151.0.7922.174
  • Chrome extension: 1.2.27268.51612
  • Microsoft Edge: 151.0.4129.107
  • Edge extension: 1.2.30001.51613

Issue

Codex can connect to both Google Chrome and Microsoft Edge and can create an about:blank tab immediately. However, every navigation request hangs and times out after approximately 30 seconds. DOM inspection cannot proceed after the timeout.

The issue reproduces in a fresh, sequential, single-task test. Browser concurrency is not required.

Steps to reproduce

  1. Fully quit Codex Desktop, Google Chrome, and Microsoft Edge.

  2. Start Codex Desktop.

  3. Start a fresh local task.

  4. Ask Codex to use Chrome to open https://example.com/ and read the page title and DOM.

  5. Codex successfully connects to Chrome and creates an about:blank tab.

  6. The navigation request hangs for 30 seconds and returns:

    js execution timed out; kernel reset, rerun your request

  7. Repeat the same test with Microsoft Edge.

  8. Edge creates the blank tab successfully, but navigation also times out after 30 seconds.

  9. After the timeout, reconnecting to close the test tab also times out.

  10. Inspecting the process tree shows that this child process remains alive:

    codex app-server --listen stdio://

Minimal reproduction

const { setupBrowserRuntime } =
  await import("<chrome-plugin-root>/scripts/browser-client.mjs");

const agent = await setupBrowserRuntime();
const chrome = await agent.browsers.get("chrome");
const tab = await chrome.tabs.new();

await tab.goto("https://example.com/");

The same failure reproduces when agent.browsers.get("edge") is used.

Diagnostics already completed

  • Both browser extensions are installed and enabled.
  • Native Messaging manifests exist and contain the correct extension origins.
  • Browser discovery succeeds.
  • Creating an about:blank tab succeeds immediately.
  • A direct request to https://example.com/ returns HTTP 200 in approximately 0.67 seconds.
  • Reinstalling the browser extensions multiple times did not resolve the issue.
  • Updating Codex Desktop did not resolve the issue.
  • The issue reproduces in both Chrome and Edge.
  • The failure still occurs without concurrent browser tasks.

Related issues

  • #30841
  • #33713
  • #39031

What is the expected behavior?

Codex should connect to the selected Google Chrome or Microsoft Edge browser, create or claim a tab, navigate to a reachable URL, and return the page URL, title, and DOM within a reasonable bounded time.

For https://example.com/, navigation should complete within a few seconds rather than timing out after 30 seconds.

If navigation or DOM inspection fails, the browser request should return a clear diagnostic error and automatically clean up the pending request, browser-control session, test tab, and child app-server process.

A timed-out request must not leave the browser connection or subsequent Codex browser operations stuck.

Additional information

No response

luoyeai avatar Aug 26 '26 05:08 luoyeai

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #39766

Powered by Codex Action

github-actions[bot] avatar Aug 26 '26 05:08 github-actions[bot]

Same signature on Windows 26.928.2636.0, plus the code path that emits this message and a diagnosability problem in it

Environment:

  • Windows 10 x64
  • Codex Desktop OpenAI.Codex 26.928.2636.0 (app 26.928.21956)
  • Google Chrome 154.0.8037.58; ChatGPT/Codex Chrome extension 1.26.901.11451
  • Backend cua_repl / chrome

Observed:

let tab = await cua.createBrowserTab("chrome", "https://example.com", {sessionName: "..."});
Timed out waiting for tab 1339846089 to navigate to https://example.com.
  • elapsed 11070 ms
  • _meta.toolSurface = {backend: "chrome", browserFamily: "chrome", browserId: "3", kind: "browserUse"}
  • immediately afterwards await cua.getState() reports the Chrome browser with tabs: []

The local side is healthy — all of it

Check Result
registry HKCU\Software\Google\Chrome\NativeMessagingHosts\com.openai.codexextension present, points at the manifest
manifest allowed_origins and path both extension ids listed; the path exists
<plugin dir>\chrome\latest a junction to the current version, not a stale directory
chrome-native-hosts-v2.json newest entry current app version; all 7 referenced paths exist
extension installed and enabled in Default; the reported profileName matches that profile's display name
extension-host.exe running, launched by Chrome over the native messaging pipes
local HTTP proxy listening

So this is not a missing/unregistered native host, not a stale versioned path, not a profile mismatch, and not a dead proxy.

The code path that produces the message

In browser-service.mjs the navigation helper issues Page.navigate and then waits for a CDP event:

// Page.navigate came back without errorText -> Chrome accepted the navigation
let ev = await cdp.waitForEvent(tabId, e => gn(e) && (hn(e) || y(e)), {
  timeoutMs,
  timeoutMessage: `Timed out waiting for tab ${tabId} to navigate to ${url}.`,
});

timeoutMs defaults to 1e4, which matches the measured 11070 ms.

Diagnosability problem in the same helper

The helper also installs a detach handler that only flips a flag, and that flag makes the match predicate return false forever:

const onTabDetached = id => { if (id === tabId) detached = true; };
const isCurrent = () => {
  if (detached || sessionChanged || frame == null || ...) return false;
  ...
};

So if the CDP session is detached mid-navigation, the call does not report a detach. It silently waits out the full timeout and then reports a navigation timeout.

That means this one message can be produced by at least two unrelated conditions — (a) the navigation genuinely never completed, or (b) the debugger session was detached — and the message does not distinguish them. It cost real diagnostic time here.

Concretely, on this machine two other extensions are installed alongside the Codex extension and both hold the debugger permission:

  • OpenCLI 1.0.24
  • COSE 1.3.6

chrome.debugger permits only one debugger per target, so contention is plausible. I have not proven that it is the cause here, and I am not claiming it — I am reporting it as the untested hypothesis it is, and as a further reason the current message is not actionable on its own.

One filesystem hint

https://example.com does not appear anywhere in Chrome's Sessions\Session_* / Tabs_* files, and that directory currently contains zero-byte residue files (Session_* and Tabs_* at 0 bytes). That is consistent with the tab never actually navigating, rather than only the completion event being dropped.

Requested

  1. Distinguish "the tab was detached" from "the navigation did not complete" — fail fast on detach, with its own message.
  2. Include the CDP detach reason in the error (for example replaced_with_devtools, canceled_by_user, target_closed).
  3. Note that this reproduces on 26.928.2636.0 after #40352 was closed as completed, so the closed fix does not cover this path.

No page content, credentials, account identifiers, machine names or raw logs are included.

qihangzhang-272 avatar Sep 30 '26 16:09 qihangzhang-272

Follow-up: a fresh cua_repl instance navigates Chrome successfully on the same machine

After the report above I ran a controlled test outside the app, on the same machine, with the same Chrome and the same extension instance.

Method: launch the bundled cua-repl.mjs directly (same env as the plugin's .mcp.json), speak MCP over stdio, and pass the per-turn metadata the browser service requires:

params._meta = { "x-codex-turn-metadata": "{\"session_id\":\"...\",\"turn_id\":\"...\"}" }

That requirement is in browser-service.mjs: We() reads requestMeta["x-codex-turn-metadata"], parses it as JSON, and tz() requires session_id and turn_id to be strings. Without it, every browser call fails with Missing required Codex turn metadata: session_id, turn_id. Worth knowing for anyone trying to reproduce this outside the app — this path cannot be exercised without a Codex turn.

Result:

Step Result
cua.listBrowsers() Chrome, browserId: "1"
cua.createBrowserTab("chrome", "https://example.com", {sessionName: "..."}) succeeded, 19.9 s, no error
cua.listBrowsers() afterwards Chrome present
tab.close() succeeded

State verified in the same window:

  • https://example.com via the system proxy: HTTP 200 in 1.5 s; direct: HTTP 200 in 1.4 s
  • native messaging registry entry present; manifest allowed_origins correct and path exists; chrome\latest junction current; chrome-native-hosts-v2.json newest entry current with all referenced paths existing
  • extension installed and enabled in Default; extension-host.exe running
  • the extension instance id is identical in the failing and the working case: 3546a4e3-91fa-4f5b-8725-82113aa00248

The difference is entirely on the client side. The failing session was bound to browserId: "3" and reported tabs: []; the fresh instance got browserId: "1" and navigated normally.

So on this machine the navigation timeout is not caused by the browser, the extension, the native host, the profile, or the network — those are healthy and unchanged between the two cases. It tracks the state of the browser-use session, and a fresh instance works. That is consistent with the intermittent stale-session behaviour in #40352 and with the per-instance staleness reported in #41359.

Combined with the detach handling described above (a detached CDP session silently degrades into this same navigation timeout), I'd suggest the error distinguish at least these three cases: the navigation genuinely did not complete / the CDP session was detached / the browser binding is stale.

No page content, credentials, account identifiers, machine names or raw logs are included.

qihangzhang-272 avatar Sep 30 '26 16:09 qihangzhang-272

Correction to my previous comment, plus in-app confirmation with the chrome backend

1. Retraction. The browserId contrast in my previous comment ("bound to 3" vs "got 1") is not meaningful, and I should not have presented it as the difference. These ids appear to be assigned in discovery order rather than being session-unique handles: in the failing session Chrome was 3 because mcpapps (1) and iab (2) were also discovered, while my minimal probe discovered only Chrome, so it got 1. The id is not the differentiator.

2. In-app confirmation, with the same browser id and the same extension instance. In a new Codex thread, with the chrome backend explicitly requested:

tab = await cua.createBrowserTab("chrome", "https://example.com", { sessionName: "chrome-verify" });
nodeRepl.write(JSON.stringify({ title: await tab.title(), url: await tab.url() }));
backend:              "chrome"
browserId:            "3"                                      <- the same id that failed earlier
extensionInstanceId:  "3546a4e3-91fa-4f5b-8725-82113aa00248"   <- the same extension instance
duration:             6837 ms                                  <- well under the 10 s navigation timeout
result:               {"title":"Example Domain","url":"https://example.com/"}

So neither the browser id nor the extension instance distinguishes the working case from the failing one — both are identical between them. The only thing that differed was the session, which narrows this to the state of the per-session browser-use runtime rather than to any browser-side or extension-side cause. That matches the per-instance behaviour reported in #41359 on the JS-kernel side.

To be explicit about the limits: I have the working/failing contrast and the identity of the two cases, but I do not have a root cause for why a session enters the failing state, nor a trigger I can reproduce on demand.

One practical note for anyone testing this: browser selection is not automatic in the way it may appear. A plain cua.getBrowser({ url }) selected iab in this environment, so a test that does not name the chrome backend can report success while never exercising Chrome at all. Asking the backend to state backend in its result is worth doing.

No page content, credentials, account identifiers, machine names or raw logs are included.

qihangzhang-272 avatar Oct 01 '26 00:10 qihangzhang-272

Additional related symptom from a Windows VS Code / external Chrome development workflow (not yet a controlled reproduction).

When Codex is instructed to inspect a local development page, it sometimes opens a new browser tab but never navigates to the requested URL. If I manually open the target page in Chrome, the workflow may continue. Other sessions navigate immediately without intervention. This intermittent behavior substantially slows visual verification.

Expected: after a successful tab creation, navigate to the provided URL and report a meaningful error if navigation is blocked, rather than silently waiting for the user to enter the URL manually.

Important distinction: the original issue concerns Codex Desktop on macOS and a consistent navigation timeout. My environment involves VS Code and external Chrome/MCP, and I have not captured a matching timeout trace. I am adding this as a similar user-visible symptom, not as proof of the same bug. Please advise how to capture per-tab navigation/bridge diagnostics in this environment.

shelamov avatar Nov 28 '26 10:11 shelamov