What happens
Each instance gets its own relay socket (packages/cli/src/commands/runner/relay.ts). On close
it reconnects with exponential backoff capped at 30s and never gives up — including when the
server is rejecting it deliberately:
ev.code === 4409 → " — run `pags up --force` to take over"
A 4409 (another runner already holds this instance+node) therefore loops forever at 30s
intervals. The other instances on the same machine stay connected, so:
- Terminals / Settings report the machine as online.
- That one agent reports not attached — amber, "machine online, agent not attached".
- The console never surfaces the reason or the remedy, even though the CLI knows both: it prints
the close code and the hint to its own stdout, which nobody is watching.
The user experience is an agent that is silently unusable with no explanation, on a machine that
looks healthy. Every runner-backed tool (repo_tree, repo_read_file, repo_git,
repo_remote) fails with "No runner is connected" while the dot says the machine is up.
Fix
The close code is already known client-side. Report it:
- Persist the last relay rejection per (instance, node) — code + reason — and expose it on
/v1/terminals/nodes and /v1/instances/:id/runtime/status.
- Render it where the amber dot is: "another runner holds this agent on RLs-MacBook-Air.local —
run pags up --force", not just "agent not attached".
- Consider surfacing repeated 4409s in
pags up's own summary line rather than only as a scrolled
log line.
Related
Same amber symptom, different cause: #236 (the runner's instance list is frozen at startup). The
two are indistinguishable in the UI today, which is the actual problem — there is no way for a
user to tell which one they have.
What happens
Each instance gets its own relay socket (
packages/cli/src/commands/runner/relay.ts). On closeit reconnects with exponential backoff capped at 30s and never gives up — including when the
server is rejecting it deliberately:
A
4409(another runner already holds this instance+node) therefore loops forever at 30sintervals. The other instances on the same machine stay connected, so:
the close code and the hint to its own stdout, which nobody is watching.
The user experience is an agent that is silently unusable with no explanation, on a machine that
looks healthy. Every runner-backed tool (
repo_tree,repo_read_file,repo_git,repo_remote) fails with "No runner is connected" while the dot says the machine is up.Fix
The close code is already known client-side. Report it:
/v1/terminals/nodesand/v1/instances/:id/runtime/status.run
pags up --force", not just "agent not attached".pags up's own summary line rather than only as a scrolledlog line.
Related
Same amber symptom, different cause: #236 (the runner's instance list is frozen at startup). The
two are indistinguishable in the UI today, which is the actual problem — there is no way for a
user to tell which one they have.