You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add client health check and lock timeout to ensure_client()
In long-running sessions with sub-agents, the Copilot CLI subprocess can
die silently (auth token expiry, Node crash, broken pipe). The old code
returned the dead client because _started was never reset. Additionally,
asyncio.Lock had no timeout, so sub-agents queued forever behind a stuck
initialization -- observed as TimeoutError with 5516.9s elapsed time.
Changes:
- ensure_client() now pings the cached client before returning (5s health
check timeout). If the ping fails, tears down the dead client and
re-initializes transparently.
- Lock acquisition now has a 30s timeout instead of waiting indefinitely,
raising CopilotConnectionError with actionable guidance on timeout.
- New _check_client_health() and _reset_client() helpers for clean
separation of concerns.
🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)
Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
0 commit comments