Skip to content

Spike: why the OpenAI Chrome host exits within a minute on the mini #7

Closed

Description

@SSFSKIM

Question

Why does the OpenAI Chrome native host exit within about a minute of the extension waking on the Mac mini, while on the first Mac hosts stay up for hours? Evidence: docs/evidence/second-mac-acceptance.md (Observations). Versions: desktop 26.924 (mini) vs 26.930 (first Mac), same extension 1.26.901.

Method

  • Read the extension host's idle/exit logic in the readable vendor source (the chrome-plugin/extension-host scripts; cite paths) — is there an idle timeout when no client (desktop app or cua) holds the browser-use socket?
  • Observe on the mini: wake the extension, record host pid lifetime with and without a cua connection open; compare with the first Mac.
  • Check whether the desktop app's own connection is what keeps hosts alive on the first Mac.

Deliverable

A findings comment: cause, whether cua can hold a keep-alive legitimately (and the cost), and the guidance the no-live-host detection ticket should give users. Record the conclusion in the spec's Surprises & Discoveries.

Activity

  1. added
    status:ready-for-implementer
    priority:P2
    spike
    status:in-progress
    and removed
    status:ready-for-implementer
    on Oct 5, 2026
  2. SSFSKIM commented on Oct 5, 2026

    @SSFSKIM
    OwnerAuthor

    [findings] The no-client idle-timeout explanation is refuted; the historical short-lived hosts' actual exit trigger was not reproduced.

    Cause and limits

    There is no evidence that these hosts must exit after a minute without a desktop/cua client. The mini's host 10685 was already almost three hours old when checked, and both Macs had long-lived hosts with no accepted browser-use socket clients. The native host's inspected lifecycle is tied to Chrome's native-messaging stdio: stdin receive failure/EOF or stdout failure exits the process; losing a Unix browser-use client removes that client and returns, not the host. That identifies the relevant lifetime boundary, not which event caused the earlier exits. There was no contemporaneous exit-status/native-transport log or socket/traffic timeline in the acceptance evidence, and this run saw no exit. Do not replace that missing evidence with a crash, extension update, or worker-idle assertion.

    Live comparison (2026-10-05 UTC)

    pgrep -fl "ChatGPT for Chrome", ps -o pid,ppid,lstart,etime,rss,pcpu,comm, and lsof -n -a -p <pid> -U were sampled every 30 seconds on the mini.

    Phase UTC interval Result
    No probe connection 20:21:51–20:23:51 PID 10685 unchanged; only fd 3, its listener; uptime 2:56:50 → 2:58:50
    Tab-free cua connection held 20:24:38–20:26:38 Same PID; listener plus fd 4/5 referring to one accepted socket, continuously present
    After owned runtime disconnected 20:26:39–20:28:39 Same PID; back to listener only; still alive 120 seconds later, uptime 3:03:38

    Used the existing /Users/new/Developer/GitHub/cua checkout on the mini and its installed pinned 26.928.40906 runtime. A scratch empty CODEX_HOME, browser-only surface, secrets disabled, listBackendsWith(..., {tabCounts:false}) did only the listing. The probe delayed the owned upstream's teardown by 120 seconds to observe a real connection, then closed it by EOF. Result: one backend, zero elicitations, teardown confirmed by EOF, owned process group empty afterward. The first probe completed the baseline but hit an argument-shape error before launching anything; the corrected probe produced the held/post-disconnect rows. Nothing was installed, no tabs were read/used, and no Chrome, ChatGPT, or host process was stopped.

    On the first Mac, hosts 33239 (desktop-cache 26.930.31730) and 79354 (cua 26.928.40906) had ~44-hour lifetimes and only listener fd 3 at both checks (~20:20 and 20:25 UTC). ChatGPT desktop PID 28029 held different /tmp/codex-browser-use listeners, not connections to these hosts. No ChatGPT desktop main process appeared in the mini's process snapshot. Desktop traffic is therefore not required to explain the long lifetimes here.

    Source evidence

    The requested MAP.md/INDEX.md trees do not contain readable Rust extension-host source. These desktop JS regions are installation/cache reconciliation, not host keepalive:

    • /Users/new/codex-app-src/readable/chatgpt-26.928.40906/main-process/main-BvBtZhys.js:16357–16482
    • /Users/new/codex-app-src/readable/chatgpt-26.924/main-process/main-C5425b_s.js:16594–16719

    The host is a native binary at /Users/new/codex-app-src/_dist/<build>/ChatGPT.app/Contents/Resources/plugins/openai-bundled/plugins/chrome/extension-host/macos/arm64/ChatGPT for Chrome. The 26.924 archive SHA-256 (3c0a43f6051ab1b29638112ab165e97f11596317c8b224aff9c408cb15f4d9b8) matches the mini's installed binary. otool -tV output, excluding its filename header, is identical across archived 26.924, archived 26.928.40906, and this Mac's installed 26.930.31730 host. Relevant addresses in all three:

    • 0x10000dc24–0x10000e574: stdin reader; receive error leads to app-server shutdown and process::exit(0) at 0x10000e1f0.
    • 0x10002f2d4–0x10002f39c: StdioWriter::send_or_exit; stdout write/flush failure exits at 0x10002f380.
    • 0x10000d72c–0x10000d810: Unix client reader cleanup removes router/writer entries and returns. No last-client shutdown timer was found in the inspected lifecycle paths.

    The readable browser client transport likewise closes its own connection, not the host: /Users/new/codex-app-src/readable/chatgpt-26.928.40906/cua_node/@oai/browser-desktop/scripts/browser-service.mjs:66600–66709; discovery/client reuse and closing discarded clients are at 67477–67560.

    MV3 worker-idle hypothesis

    Also unsupported. First Mac Chrome executable / Last Version: 154.0.8037.93 / 154.0.8037.93. Mini: 154.0.8037.98 / 154.0.8037.97 (installed executable vs last-used version differ by a patch). Both are far newer than Chrome 105, where an open connectNative port keeps the service worker alive. Ordinary 30-second MV3 inactivity is not an explanation for an intact native port on these versions.

    Both installed extension 1.26.901.11451 background.js files have SHA-256 83b7b7708ab82ecc9aa2ccad20a2167941a706b38a9467dee0bb124d13f0033e. Source on this Mac: /Users/new/Library/Application Support/Google/Chrome/Default/Extensions/hehggadaopoacecdllhhajmbjkdcmajg/1.26.901.11451_0/background.js (minified, line 1; mini equivalent is Profile 12). Relevant functions, with reproducible formatted regions in /tmp/cua-7-extension-background.pretty.js made using the existing app-source-tools Prettier:

    • Eg constructor/connect: 10350–10508, eagerly calls connectNative, retains this.port, and reconnects on disconnect. Retry/alarm logic 10543–10586: 5 seconds plus a 30-second alarm, cleared when connected.
    • Em: 17997–18023, the separate 30-second client-heartbeat alarm. Missing client replies stop browser-control sessions and detach debuggers, not disconnect the native port. Startup installs this at 18558–18562. No getPlatformInfo loop or WebSocket keepalive was found in this worker.

    The old “11:15 start → gone by 11:16:38” observation has no accompanying traffic capture, so whether it coincided with zero cua/desktop traffic cannot be established retrospectively.

    Keepalive and readiness recommendation

    A normal persistent cua browser connection is legitimate during a task, and this probe held one successfully. It is not a demonstrated fix for these historical exits and cannot preserve a host when its Chrome-side pipe closes. Keeping the entire runtime alive beyond a task is nontrivial: after startup this tab-free probe retained 8 owned processes, ~390–410 MiB summed RSS (not unique physical memory; shared pages may be counted repeatedly), versus ~9 MiB for the host. It also extends runtime/session lifetime. A tiny transport-only connection was not tested and has no demonstrated need.

    Keep host_not_live factual: no live backend is currently available; open the registered Chrome profile and click the OpenAI extension icon, then retry. If toggled/reinstalled, the instance id can change, so rebind when needed. Do not tell users a minute-scale expiry is expected or that ChatGPT must stay open. Existing user-facing guidance already largely follows this; the speculative minute comment in src/profiles/registry.mjs:138–140 should not be treated as a cause.

    Proposed follow-up ticket only, not implemented or registered here: capture the next spontaneous disconnect's native-transport error plus host/Chrome process and socket timeline, correlated with user toggles/updates and browser calls; remove the unproven timeout implication from the readiness source comment. A fresh owner-assisted reproduction is needed to settle the historical trigger. No keepalive code is justified by this run.

  3. added
    status:in-review
    and removed
    status:in-progress
    status:in-review
    on Oct 5, 2026
  4. SSFSKIM commented on Oct 5, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Findings in the issue comment and the spec's Surprises (PR #40). Idle-timeout and MV3 hypotheses refuted; historical trigger unreproduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P2spike

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions