Skip to content

ahp.connections.refresh retries forever with 30s timeouts and no backoff or circuit breaker #5594

Backlog

Description

@netwarm007

Build: 1.0.115 (packaging-agnostic: observed on both snap and standalone Windows installs, two machines).

Repro / observation (passive, log-based):

  1. Leave a CLI host process running with stale remote AHP environment connections whose compute hosts no longer exist.
  2. Tail the host process log.

Actual: ahp.connections.refresh requests fail continuously: each attempt ends after a ~30s timeout (JSON-RPC code -32603, "Connection recovery has not succeeded after 60 seconds. Background retries continue.") and the loop re-fires every ~4s indefinitely. Aggregated counts from two independent machines over ~18h: ~23,000 failed refresh requests on one host, plus a steady ~300 failures/10min rate after the dead connections were removed from user config but before the host process restarted (the retry loop keeps its in-memory snapshot).

Expected: exponential backoff with a cap; a circuit breaker after N consecutive failures; surfacing dead connections to the user (e.g. /status or one-time notice) instead of silent background churn. A shared request path with 30s-timeout retries every 4s risks event-loop pressure that plausibly contributes to user-visible latency complaints (interactions with notification-surfacing latency were inconclusive from our side and are reported separately, honestly labeled).

Related pattern: #4907 (MCP reconnect notification flood) — same class: unbounded background retry loops with user-visible side effects.

Activity

  1. added
    area:networking
    and removed on Nov 27, 2026
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

    area:networking

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions