Skip to content

[Bug]: Notarized macOS app auto-terminates ~0.5s after launch (no menu-bar icon) in remote mode — macOS 26 #89162

Closed as not planned

Description

@hershey-g

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

On macOS 26.5, the notarized macOS app (ai.openclaw.mac) launches, fully initializes, then auto-terminates ~0.5s later (clean exit 0) and never presents a menu-bar icon; reproduced on builds 2026.5.20 and 2026.5.28.

Steps to reproduce

  1. Install the official notarized release into /Applications (verified: spctl -a -vvv = accepted, stapled, codesign --verify --deep --strict clean).
  2. App configured connectionMode = remote against a self-hosted gateway over Tailscale; a separate openclaw … run --host <gateway> --port 443 --tls node service (launchd ai.openclaw.node) is also connected to the same gateway.
  3. open /Applications/OpenClaw.app
  4. Observe the process exit within ~0.5s (exit 0, no crash report) with no menu-bar icon. ps / AppleScript confirm no GUI process remains.

Expected behavior

The menu-bar app stays resident and shows its status-bar icon after launch. Known-good reference on the same machine: a re-signed copy of 2026.5.20 stays resident with the identical config (see Additional details).

Actual behavior

The app initializes fully and then AppKit automatic termination fires ~0.5s in; the app exits cleanly (exit 0, no crash report). Unified-log trace (subsystem BEGINSWITH "ai.openclaw" OR process == "OpenClaw"):

[ai.openclaw:exec-approvals.socket] exec approvals socket listening
[ai.openclaw:audio.devices] audio device observer started
[ai.openclaw:tailscale] Tailscale app installed: true
[ai.openclaw:gateway.process] gateway stop requested
[ai.openclaw:portguard] port sweep starting (mode=remote)
[ai.openclaw:PeekabooBridge] PeekabooBridge host started at …/Application Support/OpenClaw/bridge.sock
[ai.openclaw:gateway] gateway connect auth=shared-token
[ai.openclaw:control] control channel refresh endpoint reason=endpoint changed
[ai.openclaw:control] control channel state -> connecting
[com.apple.AppKit:StatusBar] 0 terminating on removal
[com.apple.AppKit:AutomaticTermination] void _NSDisableAutomaticTerminationAndLog(NSString *) Terminating
[com.apple.AppKit:Window] window <NSStatusBarWindow> finishing close
[com.apple.CoreAnalytics:client] Entering exit handler   → process exits

OpenClaw version

2026.5.28 (also reproduced on 2026.5.20)

Operating system

macOS 26.5 (Darwin 25.5.0), Apple Silicon (arm64)

Install method

Official notarized mac app (.app) copied into /Applications

Model

N/A — the app exits at launch before any agent/model is invoked.

Provider / routing chain

N/A — fails at app launch; the gateway control channel reaches connecting, then the app exits before any model/provider request is made.

Additional provider/model setup details

Not a model/provider issue — included for completeness and to ground the report:

  • spctl -a -vvv = accepted, stapled; codesign --verify --deep --strict clean. Not a Gatekeeper rejection.
  • Reproduced on both notarized 2026.5.20 and 2026.5.28.
  • …/Caches/ai.openclaw.mac/org.sparkle-project.Sparkle/Installation and PersistentDownloads are empty; clearing the Sparkle cache does not change the behavior (no staged update pending).
  • Booting out the ai.openclaw.node launchd service first does not change the behavior — the app still auto-terminates.
  • No DYLD_INSERT_LIBRARIES set; no non-system, non-bundle dylib is loaded into the process.
  • Setting NSStatusItem VisibleCC Item-0 and openclaw.showDockIcon via defaults has no effect; the app re-writes NSStatusItem VisibleCC Item-0 = 0 on each launch.
  • Data point (observed, not a diagnosis): a locally re-signed copy of 2026.5.20 — hardened runtime, with com.apple.security.cs.disable-library-validation added and Sparkle.framework removed during the re-sign — stays resident and shows the menu-bar icon with the identical ~/.openclaw/openclaw.json and app defaults.
  • Possibly related: [Bug]: Mac App and npm CLI both install same LaunchAgent label causing duplicate gateway processes #67631 (Mac app + npm CLI install the same LaunchAgent label) — this machine runs both the Mac app and the node-service LaunchAgent.

Activity

  1. clawsweeper commented on Jun 1, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 4:58 AM ET / 08:58 UTC.

    Summary
    Keep open: current main and v2026.6.9 still carry the reported macOS remote-mode launch, status-item, PortGuardian, and control-channel path, and I found no proof that the notarized macOS 26 clean AppKit automatic-termination exit is fixed.

    Reproducibility: no. high-confidence current-main reproduction is available. The reporter supplied detailed 2026.5.20 and 2026.5.28 logs, and current/v2026.6.9 source still matches the implicated launch, status-item, and remote-mode path, but latest notarized macOS 26 proof is missing.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Next step
    Maintainer-run notarized macOS 26 remote-mode reproduction and signing/lifecycle diagnosis are needed before a safe fix PR can be scoped.

    Review details

    Best possible solution:

    Keep this issue open until maintainers reproduce v2026.6.9 or current-main notarized macOS 26 remote-mode launch, then land a focused residency, status-item, signing, or packaging fix with release-package proof.

    Do we have a high-confidence way to reproduce the issue?

    No high-confidence current-main reproduction is available. The reporter supplied detailed 2026.5.20 and 2026.5.28 logs, and current/v2026.6.9 source still matches the implicated launch, status-item, and remote-mode path, but latest notarized macOS 26 proof is missing.

    Is this the best way to solve the issue?

    Unclear: the adjacent duplicate status-item fix is plausible mitigation, but it is not proof of the best fix for a notarized clean AppKit automatic-termination exit. The safer path is live notarized reproduction followed by a focused lifecycle, signing, or packaging repair.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The exact clean AppKit automatic-termination trigger has not been reproduced on v2026.6.9 or current main in a notarized macOS 26 remote-mode setup.
    • The reporter's re-signed-app data point keeps signing, Sparkle embedding, library validation, and release packaging plausible until maintainers test an official notarized build.
    • Adjacent status-item, launchd, and local PortGuardian fixes reduce nearby churn but do not prove this remote-mode launch-residency failure is resolved.

    Codex review notes: model internal, reasoning high; reviewed against e9b694ef9cd8.

    Label changes

    Label justifications:

    • P1: The issue reports a user-facing macOS companion app launch workflow that exits before the menu-bar UI remains available.
    • impact:crash-loop: The affected app process terminates shortly after launch, leaving no resident menu-bar companion process.
    Evidence reviewed

    What I checked:

    • Repository policy applied: Root AGENTS.md was read fully and required source, tests/docs, current/shipped behavior, and history evidence for review; no scoped AGENTS.md exists under apps/macos. (AGENTS.md:11, e9b694ef9cd8)
    • Vision fit: VISION.md prioritizes bug fixes, stability, setup reliability, and companion apps, so a macOS app launch-residency failure remains in scope. (VISION.md:21, e9b694ef9cd8)
    • Expected macOS app behavior: Docs describe the macOS app as a menu-bar companion that runs or connects to a local or remote Gateway and starts the local node host service in remote mode. Public docs: docs/platforms/macos.md. (docs/platforms/macos.md:9, e9b694ef9cd8)
    • Current status-item lifecycle remains relevant: Current main still uses SwiftUI MenuBarExtra plus MenuBarExtraAccess, stores the NSStatusItem, and removes stale replacement items during churn; this is adjacent mitigation, not proof of notarized app residency. (apps/macos/Sources/OpenClaw/MenuBar.swift:57, e9b694ef9cd8)
    • Current launch path matches reporter logs: applicationDidFinishLaunching applies the current connection mode, starts app services, runs PortGuardian, and enables the Peekaboo bridge, matching the reporter's launch log sequence before termination. (apps/macos/Sources/OpenClaw/MenuBar.swift:343, e9b694ef9cd8)
    • Current remote-mode path remains active: Remote mode stops the local gateway, starts the node service, ensures the remote control tunnel, and configures ControlChannel before sweeping ports. (apps/macos/Sources/OpenClaw/ConnectionModeCoordinator.swift:57, e9b694ef9cd8)

    Likely related people:

    • afalk42: Authored merged PR fix(macos): prevent duplicate menu bar icons #82739, which added the current stale NSStatusItem removal and ControlChannel debouncing on the same menu-bar/control-channel surface. (role: adjacent status-item fix author; confidence: high; commits: e18099b8c324; files: apps/macos/Sources/OpenClaw/MenuBar.swift, apps/macos/Sources/OpenClaw/ControlChannel.swift, apps/macos/Tests/OpenClawIPCTests/ControlChannelStateDebouncerTests.swift)
    • steipete: Approved and posted landing proof for the adjacent menu-bar PR, landed the attach-only LaunchAgent fix, and appears repeatedly in shortlog history for the central macOS app files. (role: reviewer/merger and adjacent macOS lifecycle contributor; confidence: medium; commits: e18099b8c324, 9e5d6c70917d; files: apps/macos/Sources/OpenClaw/MenuBar.swift, apps/macos/Sources/OpenClaw/ConnectionModeCoordinator.swift, apps/macos/Sources/OpenClaw/ControlChannel.swift)
    • DolencLuka: Authored merged PR fix(macos): keep attach-only from stopping gateway launchd #72174, which changed attach-only launchd behavior near the reporter's LaunchAgent context. (role: adjacent launchd contributor; confidence: medium; commits: 9e5d6c70917d; files: apps/macos/Sources/OpenClaw/MenuBar.swift, apps/macos/Sources/OpenClaw/GatewayLaunchAgentManager.swift, apps/macos/Tests/OpenClawIPCTests/GatewayLaunchAgentManagerTests.swift)
    • vincentkoc: Current checkout blame and v2026.6.9/current-main commits point to recent repository snapshot and release commits covering the macOS files, but this is weak feature-ownership evidence because the subjects are broad release/runtime changes. (role: recent current-main and release provenance contributor; confidence: low; commits: 273eb888749f, c645ec4555c0, e9b694ef9cd8; files: apps/macos/Sources/OpenClaw/MenuBar.swift, apps/macos/Sources/OpenClaw/ConnectionModeCoordinator.swift, apps/macos/Sources/OpenClaw/PortGuardian.swift)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    on Jun 1, 2026
  3. added
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    and removed
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 15, 2026
  4. openclaw-barnacle commented on Jul 6, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  5. openclaw-barnacle commented on Jul 14, 2026

    @openclaw-barnacle

    Closing due to inactivity.
    If this is still an issue, please retry on the latest OpenClaw release and share updated details.
    If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.

  6. self-assigned this
    on Jul 28, 2026
  7. locked as resolved and limited conversation to collaborators on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.staleMarked as stale due to inactivity

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions