Repository navigation
Refresh closed MCP connections before ordinary turns - #554
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to detect and replace closed MCP server connections during a session turn by checking connection liveness and marking the runtime dirty if any connection has lost its transport. It also adds an integration test to verify this behavior. The review feedback highlights two important areas for improvement: first, the potential for an infinite crash loop or resource exhaustion if a server repeatedly crashes immediately after startup, which could be mitigated with a cooldown or backoff mechanism; second, the performance overhead of sequentially querying connection liveness on every step of a turn, which could be addressed by rate-limiting or caching the liveness status.
Summary
Validation
git diff --check