Closed bug report

adom-context prints a connected machine as "offline" when adom-bridge targets has no reachable field (older CLI on PATH)

Drew Owens · ·closed by Colby Knox

@kyle (Mac workspace), adom-context labels a connected Adom Bridge machine "offline" whenever the adom-bridge CLI on PATH doesn't send a reachable field. The AI then reads "offline" at the start of every session and tells the user the Mac is down, even though every adom-bridge verb reaches it.

adom/hook 1.4.6 (latest) · adom-context = ~/.local/bin/adom-context · adom/adom-bridge 2.1.211 · adom/adom-bridge-macos 1.9.234 · adom/core 4.15.3 · Hydrogen for macOS 0.1.432-dev.4 · workspace on macOS 27.2 · 2026-12-04 UTC

The logic at fault

adom-context, probe_targets() copies t.get("reachable") from adom-bridge targets, so a missing key becomes None. render() then does this:

f"{t['name']} ({t['os']}, {'reachable' if t['reachable'] is True else t['reachable'] or 'offline'}"

None or 'offline' gives "offline", so "the CLI didn't say" is printed as "offline". The other fields in the same row (connectedAt, and on 2.x connected / relayConnected) are never looked at. Every row targets returns came from the relay's list of live connections, so a row with no reachable is almost certainly a connected machine.

Repro (today, same relay, same minute)

The 1.9.234 CLI's targets row carries only connectedAt, hostname, name, os and version. The 2.1.211 CLI adds reachable: true, connected: true and route: "relay".

$ PATH=<dir with adom-bridge-macos/dist/linux/adom-bridge-x86_64 as adom-bridge>:$PATH adom-context | grep machines
- Adom Bridge machines: <mac> (macOS, offline).
$ PATH=<same> adom-bridge --target <mac> status
status: ok   (the Mac answered)
$ adom-context | grep machines          # 2.1.211 on PATH
- Adom Bridge machines: <mac> (macOS, reachable).

How the old CLI gets on PATH

  • adom/adom-bridge-macos's install.sh runs link_or_copy "$CLI" "$HOME/.local/bin/adom-bridge", pointing at its own 1.9.234 Linux build, on every install or update. That's adom/adom-bridge-macos#18, still open.
  • This workspace also has a root-owned 1.9.234 aarch64 build at /usr/local/bin/adom-bridge. Any caller whose PATH doesn't put ~/.local/bin first gets it, and adom-context calls adom-bridge by bare name.

What this user saw

Across session-start printouts, the Mac was labelled "offline" from 2026-11-25 23:11 to 2026-12-01 04:34 UTC, under two names. Over that same time, adom-bridge verbs kept reaching it. The comment on adom/adom-bridge-macos#9 found the relay log showing the Mac connected and answering at the times it was labelled offline, apart from two real sleeps on a flat battery. The label came back as "reachable" at 2026-12-01 04:49 UTC, after an adom/adom-bridge update (2.1.210) replaced ~/.local/bin/adom-bridge and restarted the relay. I couldn't confirm which CLI build was on PATH during that window. That comment puts it at 2.1.207, and the repro above uses 1.9.234. Either way, the fault in adom-context is the same. adom/hook hasn't changed (1.4.6), so the label will flip back to "offline" the next time an older CLI ends up first on PATH.

Suggested fix

  • If reachable is missing, fall back to connected, then relayConnected, then connectedAt (present means connected).
  • If none of those fields are there, print "status unknown, check with adom-bridge --target <name> status". Don't suggest ping there: on Mac workspaces it falsely reports "unreachable" (adom/adom-bridge-macos#10). Never print "offline" for a missing value.
  • Print reachable: "mesh" as "mesh, dials on demand", the meaning targets gives in its own hint, instead of the bare word "mesh".
  • Optionally, add the CLI version to the line when it is below 2.x.

1 Reply

Colby Knox marked this in progress ·
Colby Knox ·

Fixed in adom/hook 1.4.7 (published; containers pick it up on their next auto-update).

adom-context no longer prints "offline" for a missing value. Only an explicit reachable: false is offline now. When reachable is missing, it uses connected, then relayConnected, then connectedAt, and with none of those it prints "status unknown, check with adom-bridge --target <name> status". reachable: "mesh" prints as "mesh, dials on demand". Two new tests use a stand-in adom-bridge that answers the way the 1.9.234 CLI does.

@kyle, the Mac side is yours: the old 1.9.234 CLI getting first on PATH (adom/adom-bridge-macos#18, plus the root-owned /usr/local/bin/adom-bridge on that workspace). With 1.4.7 that no longer shows a connected Mac as offline, but the old CLI is still the one answering.

Colby Knox closed this ·

Log in to reply.