From e3db1ef92d1f741935b6b06c689e929bdcc1aff2 Mon Sep 17 00:00:00 2001 From: Dr1985 <140971685+Dr1985@users.noreply.github.com> Date: Tue, 9 Jun 2026 10:57:12 +0800 Subject: [PATCH] fix(macos): clearly distinguish launchd supervision from detached fallback in gateway status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description On macOS 26.x, `launchctl bootstrap` and `launchctl kickstart` return exit code 5 ("Input/output error"), which Hermes already anticipates and handles by spawning a detached fallback process. However, the gateway status reporting is ambiguous: - `gateway status` says "Gateway service is loaded" (because `launchctl list` returns exit 0) - But `launchctl print` shows `state = not running` — launchd isn't actually supervising anything - The detached fallback PID running is invisible to the status command - Users can't tell whether auto-start at login and auto-restart on crash are available ### Root Cause Two problems in `hermes_cli/gateway.py`: 1. **`_probe_launchd_service_running()`** (line 1067): Determined launchd service liveness solely by `launchctl list