codex icon indicating copy to clipboard operation
codex copied to clipboard

[Windows][26.814.5517.0] In-app Browser page commands consistently stall for ~21 seconds, causing the 30-second Node REPL deadline to reset the control session

Open QinXi-ai opened this issue 3 months ago • 5 comments

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

26.814.5517.0

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Every in-app Browser operation that touches a page consistently takes about 21.4 seconds, including on https://example.com/. Browser metadata-only calls such as browser.tabs.list() return in 2–4 ms, but navigation, DOM CUA, Playwright DOM snapshots, and a minimal title evaluation all take 21.3–23.5 seconds.

The Node REPL execution tool has a default outer deadline of 30,000 ms. Two sequential page-touching Browser operations therefore exceed that deadline. The result is not a catchable Browser error; the entire JavaScript control session is reset:

js execution timed out; kernel reset, rerun your request

All Browser bindings are then lost and must be initialized again. Browser tabs may survive the reset.

Measured results:

Operation Page Elapsed time
browser.tabs.list() Browser metadata 2–4 ms
goto() example.com 23,432 ms
goto() OpenAI Help Center 23,501 ms
dom_cua.get_visible_dom() example.com 21,381 ms
playwright.domSnapshot() example.com 21,381 ms
playwright.evaluate(() => document.title) example.com 21,377 ms

Affected components observed:

  • Codex desktop package: 26.814.5517.0
  • Bundled Browser plugin: 26.814.41957
  • Browser client SHA-256: 3B9D8DCC6DC968887E8A969C63DAE6380E3C1C59FF5C474EB32DF08C353DAD87
  • Node REPL runtime bundle: 84464046935436b8

What steps can reproduce the bug?

  1. Start Codex Desktop on Windows and open a fresh projectless task.
  2. Initialize the bundled in-app Browser.
  3. Open or navigate a controlled tab to https://example.com/.
  4. Measure a metadata-only browser.tabs.list() call. It returns in a few milliseconds.
  5. In separate calls, measure any of the following against the controlled tab:
    • playwright.evaluate(() => document.title)
    • playwright.domSnapshot()
    • dom_cua.get_visible_dom()
  6. Observe that each page-touching operation takes approximately 21.4 seconds.
  7. Run two page-touching operations sequentially in one JavaScript execution using the default 30-second outer deadline.
  8. Observe js execution timed out; kernel reset, rerun your request and loss of all JavaScript Browser bindings.

The same latency reproduced on both:

  • https://example.com/
  • https://help.openai.com/en/articles/6614161-how-can-i-contact-support

This makes page complexity and the Help Center page itself unlikely to be the cause.

What is the expected behavior?

  • A minimal page operation on example.com should complete promptly rather than waiting approximately 21 seconds.
  • A Browser command timeout should reject as a bounded, catchable Browser error before the outer Node REPL deadline.
  • One or two Browser operation failures should not destroy the entire JavaScript kernel or discard unrelated Browser bindings.
  • Diagnostics should identify whether time was spent in debugger synchronization, CDP dispatch, WebView scheduling, or response propagation.

Additional information

Read-only inspection of the installed desktop bundle found a 20,000 ms default CDP command timeout:

fpe = 2e4
this.cdpCommandTimeoutMs = n.cdpCommandTimeoutMs ?? fpe

The page-command path also waits for pending debugger synchronization before issuing the CDP operation:

await r?.waitForPendingDebuggerSync?.(n.browserTabId)

The remote Browser WebView path appears to retain Electron's default background throttling; explicit disabling was found only for URLs classified as local:

ve(LL(se)) && (o.backgroundThrottling = false)

These snippets identify code paths worth checking; they do not by themselves prove which one causes the fixed approximately 21-second delay.

A temporary local mitigation is to use an outer execution deadline of at least 60 seconds and allow at most one potentially page-touching Browser operation per JavaScript tool call. Final verification under that rule completed a title read in 21,400 ms and a Help Center DOM read in 21,378 ms without resetting the kernel. This prevents the destructive reset but does not repair the underlying latency.

During diagnosis, many node_repl.exe supervisors without child processes were observed. Codex recreated 18 after an earlier set was stopped, so childlessness is not sufficient evidence that they are leaked. This observation is included only as an unconfirmed correlation and should not be treated as a proven process leak.

Related reports:

  • #35311 reproduced approximately 21.5-second navigation and deeper-control timeouts on example.com in an older Windows build, but it is closed and its primary report also covers a broader GPU/MSIX crash-remediation chain.
  • #28290 reports intermittent Node REPL resets in the Chrome-extension download path; the current report is deterministic, uses the in-app Browser, and reproduces on a neutral public page.
  • #30841 covered an approximately 30-second macOS Chrome-extension delay tied to a local network-routing path; it is closed after that reporter's network fix.

No usernames, local filesystem paths, task IDs, authentication data, cookies, or private page contents are included in this report.

QinXi-ai avatar Aug 20 '26 17:08 QinXi-ai

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

  • #39747

Powered by Codex Action

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

I found a reproducible Windows workaround for this fixed ~21 s delay.

What was happening

The affected machine already had a working local HTTP(S) proxy, and ordinary browser traffic was fast. However, the bundled browser-control child did not receive the existing proxy-related environment variables. Both Chrome control and the in-app Browser showed the same pattern:

  • localhost page navigation / DOM: tens to hundreds of milliseconds
  • remote HTTPS page navigation / DOM: consistently about 21.4 s

Read-only inspection of the current bundled browser service shows that remote-origin page actions perform an auxiliary privileged network status check before the page operation, while localhost origins are skipped. This matches the local-vs-remote split, but the app did not expose the HTTP status/error for that request, so this is a high-confidence diagnostic path rather than proof of one specific server-side failure.

Minimal workaround

Prerequisites:

  • The Codex Desktop parent environment already has a usable HTTP proxy configuration.
  • NODE_USE_ENV_PROXY=1, HTTP_PROXY, and HTTPS_PROXY are already present there.

Add this to a trusted project's .codex/config.toml:

[mcp_servers.node_repl]
env_vars = ["NODE_USE_ENV_PROXY", "HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY"]

Then completely quit and reopen Codex Desktop. This only forwards existing environment variables to the bundled browser-control child; it does not put proxy URLs or credentials in the project file.

Verified result after restart

Using fresh tabs against https://example.com/:

Surface Navigation DOM snapshot Screenshot Click + verified navigation
Chrome extension control 924 ms 46 ms 1.12 s 550 ms
In-app Browser 83 ms 32 ms 47 ms 245 ms

For both surfaces, the test clicked “Learn More”, reached https://www.iana.org/help/example-domains, and verified the changed URL, title, and DOM. The previous fixed ~21.4 s tail disappeared.

Notes

  • TUN mode was not needed for this result.
  • I did not change the upstream proxy, system proxy, browser extensions, or any browser credentials.
  • This is a user-side workaround, not an official product fix. Ideally, the managed browser-control process should inherit the intended proxy configuration automatically, and auxiliary network checks should not block page operations.

xiaoliang-source avatar Aug 24 '26 11:08 xiaoliang-source

Additional evidence from Windows desktop tests (Windows-native agent) on 2026-10-14: the roughly 21-second command overhead also compounds during supported, registered file downloads. With an outer deadline long enough for the supported flow to finish, the downloads completed, and the latency remained.

Measurements

Instrumented API invocation-to-Promise-completion times, not physical click timestamps or isolated network transfer times.

Operation Configured wait Observed elapsed time
On example.com, wait for a download without clicking or requesting any file 1,000 ms 22,338 ms, then Timed out after 1000ms waiting for download.
On example.com, start a 3,000 ms download waiter and DOM snapshot concurrently 3,000 ms Waiter rejected at 45,243 ms; DOM completed at 63,390 ms
Same no-download control with a 55-second outer deadline 3,000 ms Outer execution reset at 55,069 ms
Registered file download, six initial successful runs (one locator click, five screenshot-derived GUI clicks) 120,000 ms inner / 180,000 ms outer Both operations completed in 132,394–138,821 ms; click API returned in 82,826–87,427 ms
Four later successful downloads, same GUI helper and timeouts Same Both operations completed in 89,519–90,035 ms; click API returned in 63,264–63,332 ms
download.path({timeoutMs: 15000}) after a successful download 15,000 ms 20,665 ms

GUI clicks stayed slow, so the targeting method did not remove the delay. In the neutral 3-second control both promises were created at about 1 ms and no download was requested, so that control measures command overhead. The helper registers waitForEvent('download', {timeoutMs: 120000}) before the click, then waits for both promises. Success was checked against a pre-download inventory and the files were confirmed as PDFs. The user reports a manual download of the same files completed in about 5–10 seconds; that duration was not instrumented.

Timeout scope and the 21-second connect timeout

Read-only source excerpts from 2026-10-14 show that the download timer does not cover the whole command: setup runs before waitForDownload, some permission-check time is excluded, and cleanup is awaited afterwards. Same-tab commands can wait for the download-setup handshake, so a 120-second inner timeout is not an end-to-end deadline. The inspected download path has no explicit 21-second timer.

On 2026-10-15, on a network where chatgpt.com is reachable only through an already configured Windows system proxy, a direct TCP connection to chatgpt.com:443 timed out in 21.047 s. A direct connection to a separate unreachable address also timed out in 21.047 s, so that figure is this machine's OS connect-failure timeout. A read-only inspection the same day of desktop package 26.1007.9446.0 shows a remote site-status preflight (chatgpt.com/backend-api/aura/site_status) in the command/origin checks, with local origins handled differently. In that implementation a failed fetch does not create the successful cached result that would let later checks return promptly.

The 1-second no-download control (observed 22.338 s) lines up with one OS connect timeout plus the configured wait. Together with the preflight above, and with the proxy-inheritance report already in this issue, this strongly indicates that the browser-side preflight is not using the configured proxy, so each remote command waits out one OS connect timeout. Download totals are longer because several commands run in sequence; an exact call count is not inferred from those totals. The browser child's actual request has not been captured. The exact package version for the 2026-10-14 timings was not independently captured; the static inspection used 26.1007.9446.0. #42454 is the related report on generated cua_repl configuration.

Could maintainers verify whether that preflight runs in the browser child and whether the child inherits the Windows system proxy, including generated cua_repl configuration? Stage timing for the preflight, policy checks, download registration, input dispatch, file arrival, and cleanup would show which stage accounts for the repeated ~21 s. No policy checks, generated runtime code, proxy configuration, or download transport were modified for these tests.

LLjpcz avatar Oct 15 '26 03:10 LLjpcz

Additional Windows reproduction on 2026-11-08: the approximately 21-second page-read delay also reproduces through the Chrome extension, with almost identical timings in an existing chat and a fresh chat. A cua.getTab() call including its initial accessibility-state read takes approximately 42 seconds in both chats.

Environment

  • Windows x64, OS version reported by .NET: Microsoft Windows NT 10.0.26300.0.
  • Installed OpenAI.Codex Windows package: 26.1103.4239.0 (package metadata, not an About-dialog version).
  • Bundled browser/computer-use resources observed in the session: 26.1103.32239.
  • Chrome: 156.0.8078.81.
  • ChatGPT Chrome extension: 1.26.1102.11740; installed and enabled in the active profile.
  • Tested using the supported browser APIs through mcp__cua_repl.js.

Existing-chat versus fresh-chat comparison

Both chats used separate agent-created tabs at https://example.com/ in the same running Chrome instance. The fresh chat was projectless. This compares chat state; it is not a clean Chrome-profile or network comparison.

Operation Existing chat Fresh chat Result
browser.tabs.new() ~53 ms* 105 ms Success
tab.goto('https://example.com/') Not timed separately 6,743 ms Success
tab.url() followed by tab.title() 7 ms total Not repeated Correct URL/title
tab.playwright.domSnapshot() 21,060 ms 21,079 ms Correct page content
cua.getTab(tabId, { browser: browserId }), including initial AX read 42,411 ms 42,407 ms Correct page state

Except for the existing-chat tabs.new() value marked *, which is tool wall time, these are elapsed times measured around the awaited operations using Date.now(). They are not model reasoning times. These are individual observations, not a benchmark distribution.

The existing-chat getTab succeeded with a 45-second outer tool deadline. The fresh-chat read tests used a 55-second deadline and completed without a kernel reset. The approximately 42-second duration exceeds the tool's default 30-second deadline.

Earlier ordinary browser attempts in the original chat returned:

js execution timed out; kernel reset, rerun your request

Some earlier attempts also failed with longer waits, so this controlled 21/42-second pattern should not be assumed to explain every historical timeout.

Reproduction procedure

  1. Discover the current Chrome browser ID through the supported inventory API and select it with cua.getBrowser({ id: currentChromeBrowserId }).
  2. Name the browser session, create a dedicated tab using browser.tabs.new(), and navigate to https://example.com/.
  3. Run each timed operation in a separate tool call, with an outer deadline long enough to observe completion:
let started = Date.now();
nodeRepl.write(await tab.playwright.domSnapshot());
nodeRepl.write({ elapsedMs: Date.now() - started });
  1. Separately time cua.getTab(tab.id, { browser: browser.browserId }), including its automatically returned initial page state.
  2. Repeat in a fresh desktop chat using fresh inventory IDs and a separate test tab.

The new chat did not eliminate the delay. Tab creation and URL/title metadata access remained fast, while content/state reads were slow. Using a longer outer deadline allowed these particular reads to complete, but did not reduce the underlying latency.

Other observations and limits

The user reports recurrent browser-automation timeouts across earlier workflows and repeated Chrome, extension, and desktop-app updates. Those historical cases were not instrumented in this comparison.

A later native Windows Chrome-window comparison was stopped because the tool could not determine the current browser URL with enough confidence to enforce policy. Computer Use was ended as instructed. This resembles #59791, but its relationship to the 21-second delay is unknown. Desktop logs also contained No ChatGPT browser route is available for browser session <redacted> for the in-app browser; that is a separate backend and is not established as the cause of the Chrome timings. A timed in-app-browser comparison and a restart comparison were not completed.

Request

Could maintainers investigate the near-constant page-read overhead, including the auxiliary remote-origin checks/proxy inheritance discussed earlier in this issue, and explain why the initial cua.getTab() read takes approximately twice as long? The 2x timing is an observation, not proof of two identical internal requests.

Please provide a supported diagnostic that identifies which stage consumed the time and, if proxy inheritance is relevant, the supported configuration for the current managed cua_repl runtime. We have not verified the earlier proxy workaround on this machine and have not changed proxy settings, security checks, or bundled runtime code.

Also related by symptom: #59586. This comment adds measured Chrome results on a newer observed package and an explicit existing-chat/fresh-chat comparison, without asserting a confirmed common root cause.

Only sanitized measurements, versions, API names and error excerpts are included; no credentials, private browsing content, local usernames/paths, conversation IDs, screenshots or full logs are attached.

PalaBing avatar Nov 08 '26 03:11 PalaBing

Following up on the proxy workaround above: I can reproduce a similar delay on macOS 27.2 with Codex desktop 26.1120.50957 (build 30866), bundled CLI 0.171.0-alpha.13.2.

The page is visible and usable manually, but the agent waits a long time to read or click it:

  • Tab listing: about 20 ms.
  • A small localhost page: DOM snapshot 29 ms; click 275 ms.
  • Public external page: DOM snapshots about 10–36 seconds; a click about 30 seconds.
  • After a full restart, an external DOM snapshot still took 34 seconds, plus about 10 seconds before the tool returned. Chrome control can also exceed 60 seconds.

I tried the trusted-project [mcp_servers.node_repl].env_vars workaround with NODE_USE_ENV_PROXY, the existing proxy variable names, and the existing browser access variable names preserved. codex mcp get node_repl --json confirmed the project configuration loaded. However, after restarting, the active browser worker still did not inherit the proxy variables that were present in the parent app/app-server.

One potentially relevant difference in this version: browser control runs through the bundled unified-computer-use plugin's cua_repl service. Its generated manifest forwards only the three browser access variables; changing the separate node_repl configuration does not appear to reach it. Global generated settings are also rewritten on startup. The plugin server config schema appears to exclude transport/environment overrides.

Is there a supported way to make the current cua_repl service inherit the app's existing proxy environment, or another supported fix for this delay? I have reverted the ineffective configuration attempt and have not patched the application/plugin or disabled security checks.

This is a possible lead, not proof that missing proxy variables explain every delay. The built-in network doctor passed all four checks. No private URLs, proxy addresses, credentials, or raw logs are included.

exploration0408ssr avatar Nov 27 '26 07:11 exploration0408ssr