Open bug report

Hydrogen on Mac: container CLI 1.9.232 dials relay port 8766, but Hydrogen's relay runs on 8776 (desktop connected, every call fails)

Drew Owens · 6d ago

@kyle, on Hydrogen for Mac the container CLI can't reach the relay that Hydrogen starts. The desktop stays connected the whole time, but every adom-bridge call from the container fails, and adom-context reports "Adom Bridge machines: none reachable".

Environment (2026-11-04)

  • Hydrogen workspace on a Mac: Adom-Workspace-6a0f713bf2 (Lima, Rosetta), ADOM_BRIDGE_MODE=local
  • Desktop: Mac.office.adom.inc, connected to the relay the whole time
  • Relay: /etc/systemd/system/adom-relay.service runs /usr/local/bin/adom-bridge 1.9.200 with Environment=ADOM_WS_PORT=8775 ADOM_HTTP_PORT=8776. ~/.adom/cli-relay-ports.json says http 8776 / ws 8775.
  • CLI on PATH: ~/.local/bin/adom-bridge, which links to adom_modules/adom/adom-bridge-macos/dist/linux/adom-bridge-aarch64, 1.9.232

What happens

$ adom-bridge targets
{"error":"Cannot reach relay server (port 8766): http://127.0.0.1:8766/: Connection Failed ... Connection refused","status":"busy",
 "_hint":"status:busy — the desktop isn't connected right now ... it reconnects automatically."}
$ curl -s http://127.0.0.1:8776/health
{"connectedClients":1,"httpPort":8776,"status":"ok","wsPort":8775}

Causes

  1. 1.9.232 ignores the relay port on the client side. ADOM_HTTP_PORT=8776 adom-bridge targets still dials 8766. The old 1.9.200 binary with the same variable works (count: 1). This looks like a regression. The binary's strings also mention cli-relay-ports.json, but the client never reads that file.
  2. Interactive and Claude sessions don't get the variable anyway. ADOM_HTTP_PORT=8776 is set only in the systemd unit, not in the user's login environment. So even the older CLI dials 8766 by default.
  3. The hint is misleading. It says the desktop isn't connected and will reconnect by itself. In fact the desktop is connected, and the CLI is on the wrong port. Waiting never fixes it.
  4. adom-context repeats the same false negative: "none reachable".

Ask

  • The CLI should resolve the relay port in this order: --http-port / ADOM_HTTP_PORT, then ~/.adom/cli-relay-ports.json, then 8766.
  • Or have Hydrogen for Mac export ADOM_HTTP_PORT / ADOM_WS_PORT in the workspace's login environment (/etc/profile.d), or use the default ports.
  • When 8766 refuses the connection but the discovery file names another port that is healthy, say so in the error instead of "desktop isn't connected".
  • Update /usr/local/bin/adom-bridge (1.9.200) along with the package CLI, so the relay and the CLI don't drift apart.

Workaround I'm using now

A small loopback forwarder from 127.0.0.1:8766 to the port in cli-relay-ports.json (~/.adom/bin/relay-port-shim.py, started with setsid). After that, adom-bridge targets lists Mac.office.adom.inc. It will not survive a workspace restart.

Filed by Drew's AI agent at his request.

0 Replies

Log in to reply.