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

Offen
#5,594 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
46/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
cli

Rechercherichtung

Start by locating the ahp.connections.refresh request and its background retry loop; the issue does not name source files or tests. Read the related issue #4907 for context, then trace how retries retain the in-memory connection snapshot. Done means failed refreshes use capped exponential backoff, stop or trip a circuit breaker after repeated failures, and surface dead connections to users.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:networking

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.

Vorherrschende Sprache
Python
Sterne
11.5k
Forks
2k
Ø Merge
6 Std. 34 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/copilot-cli

Alle Issues in github/copilot-cli

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.