Skip to content

Link tunnel stays 'connected' while it is slow and drops requests; reconnect first fails with remote_forward_conflict #8753

Closed

Description

@lidge-jun

A Home-initiated link's SSH tunnel degraded for hours while ocx link status kept reporting it connected; requests through it took about 2 seconds each and model calls on the Child failed intermittently with 503 link tunnel unavailable / home_unreachable. ocx link reconnect fixed it, but the first reconnect failed with remote_forward_conflict and left the link failed until a second reconnect.

Observed on Home 2.100.2 (macOS), Child 2.100.2 (macOS, alias pen-macmini, link over a Pen relay route), 2026-11-14 UTC:

  • 10:12:51 the tunnel failed with cause network and reconnected at 10:13:08; status stayed connected from then on.
  • 13:10 and 13:24: agent runs on the Child ended with unexpected status 503 Service Unavailable: {"error":"link tunnel unavailable","code":"home_unreachable",...} from http://127.0.0.1:10100/v1/responses.
  • 13:24, measured on the Child: curl http://127.0.0.1:<tunnelPort>/healthz took 1.4 to 2.4 s per request (five tries); /v1/models through the Child took 3.6 to 4.6 s, with one 8 s timeout. On the Home itself /v1/models took 0.07 s, and a plain ssh pen-macmini true took 0.05 s. Another Child on the same Home (Linux, relay route) answered /v1/models in 0.7 s.
  • 13:26:10 ocx link reconnect --link-id <id> (nothing in flight): the link went to failed, reason forward, cause remote_forward_conflict, nextRetryAt one minute later; the Child answered 503 at once.
  • 13:26:32 a second ocx link reconnect: connected. Afterwards the same measurements: tunnel 0.03 s per request, /v1/models 0.12 s.

Two things look wrong:

  1. Nothing notices a tunnel that is up but slow or dropping requests: status is connected, link check was not tried. A latency or failure-rate signal on the link (the Home already sees lastDataEndAt and in-flight counts) would let the Home restart the tunnel or at least report it.
  2. ocx link reconnect races the old tunnel's remote forward: the new ssh starts before the Child's sshd has released the port, fails with remote_forward_conflict, and the link is left failed for a minute instead of retrying once the old process is gone.

Not checked: the Home's own tunnel logs for that window; whether the slow tunnel had moved to a worse Pen path after the 10:12 reconnect; whether 2.100.3 changes either behaviour.

Activity

  1. lidge-jun commented on Nov 14, 2026

    @lidge-jun
    OwnerAuthor

    Second Child with the same fault, same Home, same day: pen-cc-04 (Linux, Child 2.98.0, relay route). Its tunnel also failed with cause network at 10:11:58 UTC and reconnected at 10:12:15; from then on /v1/models through it took 1.8 to 2.6 s (other Linux Children on the same Home: about 0.65 s) and agent runs there failed with 503 link relay authentication failed. One ocx link reconnect at 13:27 UTC (connected on the first try) brought it back to 0.65 s. So both degraded tunnels were ones re-established during the same network blip at 10:12 to 10:13 UTC.

  2. Ingwannu commented on Nov 16, 2026

    @Ingwannu
    Owner

    The two observations should stay separate: a running SSH process can still carry a slow or unusable relay, while a reconnect's remote_forward_conflict concerns release of the old forwarding resource. The common reconnect window is useful evidence, but does not establish that the relay changed path or identify the cause of the later authentication failures.

    For the reconnect race, the acceptance fixture should hold the old forward after its process begins teardown, attempt replacement, then release it: retry must be bounded and tied to that link's owned generation, with no port stealing, arbitrary process killing or duplicate tunnel. A failure must retain accurate state/reason and cancellation must stop any pending retry. For degraded connectivity, distinguish transport liveness, relay authentication and inference readiness; latency alone should not become an unreviewed automatic restart policy.

    The missing bounded timeline is the Home supervisor's state transitions plus teardown/forward-establishment results around the two reconnects (redacted link labels, no hosts, credentials or full logs). I did not reconnect, restart or otherwise alter the reported live links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions