openclaw - ✅(Solved) Fix [Bug]: macOS app stays on 'Health check pending' even when gateway is healthy [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#66306Fetched 2026-04-15 06:26:42
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
commented ×1cross-referenced ×1mentioned ×1referenced ×1

The macOS OpenClaw app stays on Health check pending even though the local gateway is healthy and the app control channel reaches connected.

Root Cause

The macOS OpenClaw app stays on Health check pending even though the local gateway is healthy and the app control channel reaches connected.

Fix Action

Fixed

PR fix notes

PR #66321: fix: macOS app stays on 'Health check pending' even when gateway is healthy

Description (problem / solution / changelog)

Summary

  • Problem: macOS app shows "Health check pending" even when the gateway is healthy, because summaryLine requires resolveLinkChannel to be non-nil — which fails when no channel has linking info
  • Why it matters: Users see a permanent "pending" state even with a fully functional gateway, causing confusion and false alarm
  • What changed: When resolveLinkChannel returns nil, state and summaryLine now fall back to snapshot.ok — returning .ok / "Gateway healthy" when the gateway is responsive, and .unknown / "Health check pending" only when snapshot.ok is not true
  • What did NOT change (scope boundary): No changes to health check networking, gateway probing, or channel linking logic

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #66306
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: summaryLine and state properties require resolveLinkChannel to return a non-nil channel to show healthy status, but gateways without linked channels (fresh installs, single-channel setups) never satisfy this condition
  • Missing detection / guardrail: No test case for health status with snapshot.ok = true but no linked channel
  • Contributing context (if known): Link channel requirement was likely added for multi-channel setups but breaks single/no-channel configurations

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
  • Target test or file: HealthStoreStateTests.swift
  • Scenario the test should lock in: Gateway healthy (ok=true) with no linked channel should show healthy status
  • Why this is the smallest reliable guardrail: Direct test of the state resolution logic
  • If no new test is added, why not: N/A — three new tests added

User-visible / Behavior Changes

  • macOS app now correctly shows healthy status when gateway is responsive, regardless of channel linking state

Diagram (if applicable)

Before:
[gateway ok=true, no link channel] -> state: .unknown -> "Health check pending"

After:
[gateway ok=true, no link channel] -> state: .ok -> "Gateway healthy"

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: macOS app
  • Model/provider: N/A
  • Integration/channel (if any): N/A

Steps

  1. Install macOS app
  2. Configure gateway without channel linking
  3. Observe "Health check pending" despite healthy gateway

Expected

  • Shows "Gateway healthy" or similar positive status

Actual

  • Shows "Health check pending" indefinitely

Evidence

  • Trace/log snippets: Code path analysis showing state resolution

Human Verification (required)

  • Verified scenarios: Traced HealthStore state/summaryLine logic
  • Edge cases checked: No snapshot (pending), snapshot ok + no link (now healthy), snapshot ok + link (healthy with channel info), snapshot not ok (error)
  • What you did not verify: macOS app UI rendering end-to-end

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: Users without linked channels may lose the "link your channel" prompt
    • Mitigation: Only changed the health status display, not the linking UX flow

🤖 AI-assisted (Claude) — macOS health status fix, human-verified

Changed files

  • apps/macos/Sources/OpenClaw/HealthStore.swift (modified, +35/-3)
  • apps/macos/Tests/OpenClawIPCTests/HealthStoreStateTests.swift (modified, +142/-0)

Code Example

$ openclaw health --json
{
  "ok": true,
  "durationMs": 0,
  ...
}

---

{"event":"control channel state -> connected","category":"control",...}
{"event":"gateway using existing instance details=port 18789, health probe succeeded, pid 86615 node @ /Users/michael/.openclaw/tools/node-v22.22.0/bin/node","category":"gateway.process",...}

---

PATH=/Users/michael/.openclaw/tools/node/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

The macOS OpenClaw app stays on Health check pending even though the local gateway is healthy and the app control channel reaches connected.

Steps to reproduce

  1. Launch the macOS OpenClaw app on this machine.
  2. Ensure the local gateway is already running and healthy.
  3. Observe the app UI remains on Health check pending.
  4. Run openclaw health --json in Terminal and observe "ok": true.
  5. Inspect ~/Library/Logs/OpenClaw/diagnostics.jsonl and observe successful control-channel connection plus successful gateway health probe, but no health-state transition in the app logs.

Expected behavior

Once the app connects to the local gateway and the gateway health probe succeeds, the app should leave the pending state and show a healthy status.

Actual behavior

The app UI remains on Health check pending indefinitely. The backend is healthy, and the native app diagnostics show successful control-channel connection and successful gateway health probing.

OpenClaw version

CLI/gateway: OpenClaw 2026.4.12 (1c0672b)

App bundle observed locally: 2026.4.11

Operating system

macOS 26.4.1 (Build 25E253)

Install method

CLI/gateway installed via pnpm; macOS app bundle in /Applications/OpenClaw.app

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

$ openclaw health --json
{
  "ok": true,
  "durationMs": 0,
  ...
}

Relevant app diagnostics from ~/Library/Logs/OpenClaw/diagnostics.jsonl after a clean relaunch:

{"event":"control channel state -> connected","category":"control",...}
{"event":"gateway using existing instance details=port 18789, health probe succeeded, pid 86615 node @ /Users/michael/.openclaw/tools/node-v22.22.0/bin/node","category":"gateway.process",...}

Observed app runtime environment after the clean relaunch:

PATH=/Users/michael/.openclaw/tools/node/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin

Additional observed behavior:

  • The original PATH problem was fixed locally; the app now starts with a valid path to both openclaw and node.
  • The pending state still reproduces after clearing app WebKit/cache state and relaunching the app through the fixed launcher.
  • In current diagnostics I do not see health refresh failed, health refresh recovered, or another successful health-state transition after the control channel connects.

Impact and severity

Affected: macOS app local status UI on this machine

Severity: Medium; the backend works, but the app reports a misleading stuck status

Frequency: Reproduced on every recent relaunch during investigation

Consequence: The app appears unhealthy even when the gateway and CLI health checks are good, which makes local troubleshooting and trust in the status UI harder.

Additional information

  • This does not appear to be a gateway-health failure. The gateway is healthy and reachable from the CLI during repro.
  • The behavior persisted after fixing the app launch environment and relaunching the app cleanly.
  • Diagnostics file used for the investigation: ~/Library/Logs/OpenClaw/diagnostics.jsonl

extent analysis

TL;DR

The macOS OpenClaw app may be stuck on "Health check pending" due to a version mismatch between the CLI/gateway and the app bundle.

Guidance

  • Verify that the app bundle version matches the CLI/gateway version, as the issue might be resolved by updating the app bundle to 2026.4.12.
  • Check the diagnostics.jsonl file for any error messages or warnings that could indicate why the health-state transition is not occurring.
  • Attempt to clear the app's cache and relaunch the app to see if the issue persists.
  • Review the openclaw health --json output to ensure that the health check is succeeding and that there are no other issues with the gateway or control channel.

Example

No code snippet is provided as the issue seems to be related to version mismatch or configuration rather than code.

Notes

The issue might be specific to the macOS environment or the OpenClaw version. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Update the app bundle to 2026.4.12 to match the CLI/gateway version, as this might resolve the version mismatch issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Once the app connects to the local gateway and the gateway health probe succeeds, the app should leave the pending state and show a healthy status.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING