omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

omarchy-launch-openclaw ignores gateway.mode=remote and runs `gateway install --force`, breaking the remote client

Open RobertoGongora opened this issue 1 month ago • 1 comments

System details

AMD Ryzen 9 9950X3D (VM), Omarchy omarchy-dev 4.0.0.r7437.g7f4b1dd-1 (master as of 2026-10-30), OpenClaw CLI 2026.10.5 (1b58cb9) in ~/.openclaw, Hyprland 0.57.0.

What's wrong?

This machine's OpenClaw is configured as a remote client: ~/.openclaw/openclaw.json has gateway.mode: "remote" pointing at a gateway on another host, and the machine is paired with that gateway as a node (openclaw-node.service). There is no local gateway and there should not be one.

Opening "OpenClaw" from the app grid (omarchy-launch-openclaw) ignores that and converts the machine into a broken local-gateway setup:

  1. dashboard_url runs openclaw dashboard --json. In remote mode that command returns {"ok":false,"reason":"Gateway is not running."} with rc 0, so the launcher reads "not running" even though the remote gateway is up (openclaw gateway health → OK).
  2. openclaw-gateway.service is not enabled (never was, this is a client), so the launcher takes the openclaw gateway install --force branch.
  3. gateway install --force writes a fresh gateway.auth: { mode: "token", token: "…" } block into openclaw.json and installs/enables ~/.config/systemd/user/openclaw-gateway.service.
  4. The new local unit fails on every boot with Gateway start blocked: set gateway.mode=local (current: remote) (exit 78).
  5. Worse, the new local gateway.auth.token is now sent to the remote gateway, which rejects every connection: unauthorized: gateway token mismatch (set gateway.remote.token to match gateway.auth.token). All remote-mode clients on the machine (CLI, the OpenClaw Chat plugin, anything using GatewayClient) go down until the block is removed by hand.

The launcher never showed a warning or asked anything; the window simply didn't open and the config was already rewritten.

Steps to reproduce

  1. Configure OpenClaw as a remote client: openclaw.json with gateway.mode = "remote" and gateway.remote.url pointing at a working gateway elsewhere, no local openclaw-gateway.service.
  2. Confirm openclaw gateway health reports OK.
  3. Launch OpenClaw from the app grid.
  4. jq .gateway ~/.openclaw/openclaw.json now contains an auth.token block, systemctl --user status openclaw-gateway.service shows the failing unit, and openclaw gateway health fails with the token mismatch above.

Expected

With gateway.mode = "remote" the launcher should respect the configured gateway and open its Control UI (or the TUI), not try to install a local one. More generally, gateway install --force is a destructive step: before running it the launcher should check that no openclaw.json with a configured gateway exists, or at least warn ("this normally needs a clean config, found an existing openclaw.json with gateway.mode=remote") instead of silently overwriting.

Recovery

jq 'del(.gateway.auth)' ~/.openclaw/openclaw.json > /tmp/oc.json && mv /tmp/oc.json ~/.openclaw/openclaw.json
systemctl --user disable --now openclaw-gateway.service
rm ~/.config/systemd/user/openclaw-gateway.service && systemctl --user daemon-reload

Related

#14164 is about the same dashboard_url probe failing for a different reason (slow CLI); both end up in the gateway install --force branch on a machine where that is the wrong move.


Filed by Claude Fable 5.1 via Claude Code.

RobertoGongora avatar Oct 30 '26 08:10 RobertoGongora

I read the report, the related #14164 discussion, and the launcher on quattro at 64c0b627c9344303665d12419230fa0c756f206f. At bin/omarchy-launch-openclaw:72–76, a dashboard probe that returns no URL leads to gateway start or gateway install --force based on local service enablement, without checking gateway.mode. I have not reproduced the reported configuration rewrite or token mismatch, and no tests ran.

This was a source review by GPT-6 in Codex; the session does not expose its reasoning effort. My classification was bug, but the configured classification model, deepseek-v4p1-flash, supplied no class, so classification remains unsettled. The separate reviewer health check passed; this was not a second review of the issue. No label or fix was added. The item waits for classification to be resolved before verification and a fix can proceed.

omarchybot avatar Nov 18 '26 17:11 omarchybot