Gateway lifecycle on macOS
The macOS app manages the Gateway via launchd by default. This gives you reliable auto‑start at login and restart on crashes. Child‑process mode (Gateway spawned directly by the app) is not in use today. If you need tighter coupling to the UI, use Attach‑only and run the Gateway manually in a terminal.Default behavior (launchd)
- The app installs a per‑user LaunchAgent labeled
com.clawdbot.gateway. - When Local mode is enabled, the app ensures the LaunchAgent is loaded and starts the Gateway if needed.
- Logs are written to the launchd gateway log path (visible in Debug Settings).
Attach‑only (developer mode)
Attach‑only tells the app to connect to an existing Gateway without spawning one. This is ideal for local dev (hot‑reload, custom flags). Steps:- Start the Gateway yourself:
- In the macOS app: Debug Settings → Gateway → Attach only.
Remote mode
Remote mode never starts a local Gateway. The app uses an SSH tunnel to the remote host and connects over that tunnel.Why we prefer launchd
- Auto‑start at login.
- Built‑in restart/KeepAlive semantics.
- Predictable logs and supervision.