[BUG] VSCode Extension Client-Side Stream Timeout Fires Before Backend Completion, Causing Silent Success

Resolved 💬 3 comments Opened May 14, 2026 by TechTraveler Closed May 15, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

During generation of a large response (embedded C# P/Invoke code within a PowerShell script, ~13KB), the VSCode extension client-side stream went idle long enough to trigger an internal timeout. The extension fired sdk_stream_ended_no_result with had_error: true and marked the session idle — while the Claude backend was still running. The backend completed successfully 23 seconds later, writing the file as intended. The UI displayed no indication of completion, leaving the user with a hung appearance and no confirmation that the Write operation had succeeded.

What Should Happen?

The extension should either:

  • Hold the stream open until the backend signals actual completion (not infer completion from idle time), or
  • Surface a visible "still working" indicator to the user when the stream is idle but the backend session has not sent a terminal event, or
  • Relay the Write tool's outcome to the UI when the backend does complete, even if the client had previously transitioned to idle

Error Messages/Logs

Steps to Reproduce

Not clear

Failure Chain

  1. Backend enters a sustained generation phase producing a large contiguous block (embedded C# source code). Stream is open but idle — no tokens are being emitted to the client.
  2. The VSCode extension client interprets the idle stream as a stalled or terminated connection.
  3. Client fires sdk_stream_ended_no_result with had_error: true and transitions the UI to idle state.
  4. Backend completes generation, executes the Write tool (outcome: ok, 13,178 bytes), and runs a follow-on PowerShell verification command.
  5. These completions are not surfaced to the UI, which has already declared the session over.
  6. User observes the UI as stuck or hung with no output and no confirmation.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.141

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Claude VSCode.log.log

bug-report-vscode-stream-timeout.md

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗