Skip to content

macOS: optional browser NativeMessagingHosts EPERM silently disables cua_repl in new chats #49307

Open

Description

@fu1fan

What version of the Codex App are you using?

26.924.51851, build 12111 (read from the installed app's Info.plist).
Bundled CLI recorded in affected sessions: 0.158.0-alpha.2.1.

What subscription do you have?

GPT Pro 5x

What platform is your computer?

macOS 27.2 (26B5091g), Apple Silicon; Darwin 27.2.0 arm64.

What issue are you seeing?

Computer Use silently disappears from new local chats after a bundled-plugin reconciliation failure. One chat could call cua_repl.js and read/control Finder; subsequent chats in the same desktop process had no cua_repl server in their MCP startup lists. No app restart or manual configuration change occurred between these chats. Selecting the same Finder plugin mention did not help.

The triggering reconciliation error is in the Chrome plugin's native messaging registration, including browser directories for browsers that are not installed (Microsoft Edge was not installed on this machine). A browser-registration failure appears to disable the unified runtime for unrelated native desktop tasks such as Finder.

Both computer-use and unified-computer-use remained enabled. The installed unified plugin's .mcp.json had enabled: true and CUA_REPL_ENABLED_SURFACES=browser,computer. Node, Node REPL, the CUA script, and the Computer Use service app were present.

What steps can reproduce the bug?

Observed sequence on the affected machine (the underlying cause of the OS EPERM has not been isolated):

  1. Start the desktop app with Computer Use enabled. Initial bundled-plugin reconciliation succeeds.
  2. Create a local chat and use Computer Use on Finder. cua_repl starts and the call succeeds.
  3. Refocus the app, triggering another bundled-plugin reconciliation (reason=focus). Native messaging registration attempts to create a missing browser directory and receives EPERM.
  4. Create another local chat and inspect its actual callable tools/MCP startup events. node_repl is present but cua_repl is absent, despite the plugin remaining enabled on disk.
  5. After creating the missing Edge NativeMessagingHosts directory by Finder, refocus the app: the same failure moves to the missing Brave directory.
  6. After the remaining Brave NativeMessagingHosts directory is supplied, create another chat. cua_repl.js is available again and successfully executes let app = await cua.getApp("Finder");, returning the Finder accessibility tree. This was an actual tool call, not just a model claim that the plugin was installed.

What is the expected behavior?

  • Native messaging registration should avoid creating directories for uninstalled browsers, or treat failure for an optional browser as a per-browser error.
  • A Chrome/Edge/Brave registration error should not remove native Finder/desktop control from new chats.
  • Preserve a previously working CUA initialization result when unrelated reconciliation fails, or surface an actionable error instead of silently omitting the tool.

Additional information

Selected desktop logs, UTC on 2026-09-29; user paths and session identifiers redacted:

16:11:47.813 bundled_plugins_reconcile_completed reason=startup
16:11:51.343 mcp_server_startup_status_updated server=cua_repl status=ready
16:12:15.894 bundled_plugins_reconcile_started reason=focus
16:12:17.049 bundled_plugins_reconcile_failed errorCode=EPERM
  errorMessage="EPERM: operation not permitted, mkdir '/Users/<user>/Library/Application Support/Microsoft Edge'"
  reason=focus
16:31:31.957 bundled_plugins_marketplace_install_failed
  pluginName=chrome installPhase=reconcile_chrome_native_host errorCode=EPERM
  errorMessage="EPERM: operation not permitted, mkdir '/Users/<user>/Library/Application Support/BraveSoftware/Brave-Browser'"
16:31:31.960 bundled_plugins_reconcile_failed reason=focus

Local inspection of this installed build's bundled JavaScript suggests the following failure propagation (minified function names are specific to this build):

  • Native messaging registration enumerates configured browser manifest directories and writes them with Promise.all; the write helper recursively creates missing parent directories. The registration path does not first filter for installed browser apps.
  • The reconciliation promise is stored for the local app-server connection (os() in main-D36NDiOU.js).
  • ss() awaits reconciliation and CUA runtime synchronization together with Promise.all([t,n]), returning null if either rejects.
  • ls() checks the returned cuaReplEnabled result; when absent, it adds an mcp_servers.cua_repl override with enabled: false.

This explains how an optional browser registration error can hide an otherwise configured CUA runtime. This is an inference from the bundled code and matching logs, not a captured live heap trace. No app bundle patches or permission changes were used for recovery. Supplying the missing directories was a workaround; it does not fix the error isolation problem.

Activity

  1. added
    bug
    app
    skills
    on Sep 29, 2026
  2. fu1fan commented on Sep 29, 2026

    @fu1fan
    Author

    Further investigation identified the OS-side denial: TCC kTCCServiceSystemPolicyAppDataDetailed fails because the target browser has no associated installed app bundle. This is more specific than the EPERM in the original report.

    Two matching cases were captured in the macOS unified log on September 30, 2026 (times below are Asia/Shanghai, UTC+8):

    • 00:30:10: /bin/mkdir, attributed to Terminal (com.apple.Terminal), attempts the Edge directory. TCC cannot resolve com.microsoft.edgemac.
    • 00:31:31: Codex's main process (com.openai.codex) is reconciling browser integration. TCC cannot resolve com.brave.Browser; the desktop log reports the Brave directory mkdir EPERM milliseconds later.

    Relevant excerpts, with user paths and process identifiers omitted:

    00:30:10.976 tccd:
      bundleRecordWithApplicationIdentifier failed for com.microsoft.edgemac
      Code=-10814 kLSApplicationNotFoundErr
    
    00:31:31.950 tccd:
      bundleRecordWithApplicationIdentifier failed for com.brave.Browser
      Code=-10814 kLSApplicationNotFoundErr
    
    sandboxd (both cases):
      Error Domain=kTCCErrorDomain Code=9
      "server error: kTCCServiceSystemPolicyAppDataDetailed access requires indirect object have an associated app bundle"
      TCC denied kTCCServiceSystemPolicyAppDataDetailed
    

    In the same 00:31:31 sequence, TCC explicitly granted Codex's SystemPolicyAppDataDetailed access for com.google.Chrome before failing on Brave. This is not evidence of a blanket prohibition on all Application Support directories.

    Additional findings:

    • Terminal failed even with sudo; the directories were successfully created using Finder, not Terminal. The captured Terminal mkdir above has euid=501, so it independently verifies the ordinary Terminal failure, not the separate sudo attempt.
    • The installed Codex main executable has com.apple.security.app-sandbox = false. The observed denial is nevertheless a TCC application-data check; disabling App Sandbox does not bypass mandatory access control.
    • Apple's On File System Permissions explains that mandatory access control applies even to root. This is consistent with the reported sudo behavior.
    • We have not captured Finder's authorization path, compared against an older macOS release, or established that this particular behavior was newly introduced in macOS 27.

    This strengthens the case for filtering native-host registration to installed browsers, isolating per-browser failures, and preventing a failed optional browser registration from nullifying the working CUA runtime synchronization result.

  3. scottzdiamond-gif commented on Oct 22, 2026

    @scottzdiamond-gif

    Independent reproduction on desktop app 26.1013.40934 / build 20770 / prod, Apple Silicon, macOS 27.0.1 (26A434). This is a later app build and a different macOS build from the original report.

    Read-only examination of the affected machine now independently confirms the OS-side explanation in the previous comment. Selected UTC events on 2026-10-21:

    21:14:36.126 sandboxd: TCC granted kTCCServiceSystemPolicyAppDataDetailed for com.google.Chrome
    21:14:37.092 tccd: bundleRecordWithApplicationIdentifier failed for com.brave.Browser; Code=-10814 kLSApplicationNotFoundErr
    21:14:37.092 sandboxd: kTCCErrorDomain Code=9:
      kTCCServiceSystemPolicyAppDataDetailed access requires indirect object have an associated app bundle
    21:14:37.096 desktop: Chrome native-host reconciliation EPERM
    21:14:37.104 desktop: bundled_plugins_reconcile_failed reason=focus
    21:14:57 affected existing chat: browser/computer-use tools withdrawn
    
    21:44:04.864 tccd: missing com.brave.Browser, followed by the same TCC denial
    21:44:04.865 tccd: missing com.microsoft.edgemac, followed by the same TCC denial
    21:44:04.881 desktop: native-host reconciliation EPERM for absent Brave support directory
    

    The registration work is concurrent, so the first desktop error need not name every browser whose TCC check failed. Neither Edge nor Brave is installed. Chrome access is explicitly granted in the same OS-log sequences.

    Additional finding from the installed bundled JavaScript: the app's own browser-window-focus handler invokes external-plugin reconciliation with reason=focus. This is not an agent asking to use Edge. The native-host path enumerates configured browser directories and uses Promise.all, without an installed-browser filter in that path.

    Startup and focus handle the failure differently. The startup caller does not set throwOnReconcileFailure:true and still runs runtime synchronization after receiving a failure result. The focus caller does set it; the rejection then reaches the combined reconciliation/runtime result and returns null, after which the CUA-selection path disables the tool. Morning logs show the same registration EPERM followed by startup-completed events; later focus checks fail. This explains how working browser controls can disappear without a user changing settings. This causal explanation is supported by matching bundled code and logs, not a live heap trace.

    A narrowly scoped workaround supplying the expected helper directories/manifests, followed by an app restart, restored actual create/read/close of new blank Chrome tabs in two previously affected existing chats. One also passed after another ordinary app-focus transition. Configuration and browser permissions were unchanged. This is a workaround plus bounded recovery evidence, not a durable fix for the app's error isolation.

    The configured updater now offers 26.1016.51333 / build 21161; it has not yet been installed or tested here.

    Could an OpenAI maintainer please respond with (1) whether this failure chain has a fix, and the first fixed desktop build; (2) a supported durable recovery that does not require installing unused browsers, relaxing macOS permissions, choosing a particular model, or replacing chats; and (3) whether optional-browser registration will be isolated so it cannot discard already-working Chrome/native controls? No private project content, credentials, raw session logs, or user-identifying paths are attached.

  4. mitsuya0077 commented on Nov 3, 2026

    @mitsuya0077

    Additional isolated reproduction against the bundled Chrome plugin 26.1027.61615.

    The app-bundled and cached scripts/installManifest.mjs have the same SHA-256:
    2a1daeb3a0de6f66efe13ae757a0ef20f383ef044420b460424d9402c4eb589e.

    I reproduced a second consequence of the grouped registration failure without changing macOS permissions or any installed files:

    1. Evaluate the exact installer code in an isolated Node VM with all filesystem, OS, process and child-process imports replaced by explicit fakes.
    2. Let common host configuration succeed.
    3. Hold the required Chrome manifest write pending, and make an optional Edge destination reject with synthetic EPERM.
    4. The original installer rejects while the other manifest write is still pending. That write continues after the rejection. An immediate retry can therefore overlap the previous attempt's writes.

    A proposed isolation contract passed 10 fixture cases: wait for all destinations; return per-destination outcomes; distinguish common configuration failure, required-browser failure and optional warnings; retain all-required behavior for legacy callers; avoid rewriting unchanged files; support a caller-selected failed-destination retry; and reject a pre-existing symlink leaf. The static symlink case does not prove resistance to path-swap races, and mocked atomic writes do not prove crash durability or native macOS/Windows/Linux behavior.

    An important integration detail: this bundle's exported install currently consumes runtime paths but receives no required-browser selection and discards the registration helper's result. Merely replacing Promise.all with allSettled, or accepting any one successful destination, would incorrectly report success when the requested browser failed. The caller and runtime availability handling need to preserve a usable browser/native CUA surface while reporting individual failures.

    Current Chrome create/read/link/close operations succeed on this machine; the historical TCC-to-tool-withdrawal chain has not been re-created here. No installed plugin, native-host manifest, permission, app/browser process, CI service or runner was changed or restarted. No raw logs, sessions, screenshots, private paths, proprietary source or patch files are attached.

    Could maintainers confirm the first build fixing this failure isolation, and a supported application/plugin update or reconcile path that preserves running tasks without a restart? This is a request for the maintained distribution fix, not for a broad Full Disk Access workaround.

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

    appbrowserbugcomputer-useskills

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions