fix(vscode): surface backend crash recovery#10783
Conversation
Code Review SummaryStatus: 2 Issues Found | Recommendation: Low severity — safe to merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Race condition detail (WARNING)Scenario: this.client = client // overwrites the null set by resetConnection()
this.sseClient = sse // overwrites the null set by resetConnection()At this point The impact is limited because:
This is inherent to the single-process architecture and the PR already substantially improves the status quo. Worth noting for a future hardening pass (e.g. a generation counter that Source-text scanning test (SUGGESTION)
A comment near the Incremental update (commit d3f8a65)The new commit adds Files Reviewed (9 files)
Fix these issues in Kilo Cloud Reviewed by claude-4.6-sonnet-20260217 · 295,567 tokens Review guidance: REVIEW.md from base branch |
The VS Code extension can keep a stale SDK client after its spawned
kilo serveprocess exits. Subsequent requests then fail against a dead localhost endpoint while the chat surface remains in a state that looks usable, which makes prompts appear to disappear without a clear recovery path.This change treats an unexpected CLI child exit as a connection failure, clears the stale client and server config immediately, and forwards a retryable error to the existing chat banner. The prompt input also rechecks connectivity after asynchronous attachment resolution so a crash during submit preparation preserves the draft instead of clearing it. Together these changes make backend death visible and leave the extension in a recoverable state rather than silently sending requests to a dead process.