claude-code - 💡(How to fix) Fix Opus 4.7 1M via Bedrock: VSCode extension stream ends with 0 events; fallback renders as "Unhandled case: [object Object]" [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52151Fetched 2026-04-23 07:35:17
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Timeline (top)
labeled ×4

Error Message

Streaming request opens, Bedrock closes it with zero events:

[DEBUG] [API REQUEST] /model/global.anthropic.claude-opus-4-7/invoke-with-response-stream source=sdk
[DEBUG] Stream started - received first chunk
sdk_stream_ended_no_result { had_error: true, message_count: 556 }
[ERROR] Stream completed without receiving message_start event - triggering non-streaming fallback
[ERROR] Error streaming, falling back to non-streaming mode: Stream ended without receiving any events

Non-streaming fallback fires and also fails — the resulting error is passed to the UI error handler which stringifies it as [object Object].

Code Example

[DEBUG] [API REQUEST] /model/global.anthropic.claude-opus-4-7/invoke-with-response-stream source=sdk
[DEBUG] Stream started - received first chunk
sdk_stream_ended_no_result { had_error: true, message_count: 556 }
[ERROR] Stream completed without receiving message_start event - triggering non-streaming fallback
[ERROR] Error streaming, falling back to non-streaming mode: Stream ended without receiving any events
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code VSCode extension: 2.1.114.c47
  • Model: global.anthropic.claude-opus-4-7 (1M context profile) via AWS Bedrock
  • Platform: macOS (Darwin 25.3.0)
  • CLI works fine on the same account/model; this only reproduces in the VSCode GUI

Symptom

After a number of turns with tool use (message_count: 556 in the failing session), the assistant stops responding. GUI shows:

Unhandled case: [object Object] <img width="589" height="68" alt="Image" src="https://github.com/user-attachments/assets/b27c051a-5aca-46df-9cf8-a05d0ab90367" />

Logs

Streaming request opens, Bedrock closes it with zero events:

[DEBUG] [API REQUEST] /model/global.anthropic.claude-opus-4-7/invoke-with-response-stream source=sdk
[DEBUG] Stream started - received first chunk
sdk_stream_ended_no_result { had_error: true, message_count: 556 }
[ERROR] Stream completed without receiving message_start event - triggering non-streaming fallback
[ERROR] Error streaming, falling back to non-streaming mode: Stream ended without receiving any events

Non-streaming fallback fires and also fails — the resulting error is passed to the UI error handler which stringifies it as [object Object].

Repro

  1. Bedrock account with 1M context access on global.anthropic.claude-opus-4-7
  2. Long session (hundreds of turns) using deferred tools (TaskCreate/TaskUpdate/TaskList)
  3. Eventually the stream closes with 0 events and the fallback dies

extent analysis

TL;DR

The issue can be mitigated by investigating the streaming request closure with zero events and handling the error properly in the non-streaming fallback.

Guidance

  • Investigate why the streaming request is closing with zero events, as indicated by the sdk_stream_ended_no_result log message, to determine if it's a server-side or client-side issue.
  • Review the error handling in the non-streaming fallback to ensure it properly handles the error and provides a meaningful error message instead of stringifying it as [object Object].
  • Verify that the message_count threshold of 556 is not a contributing factor to the issue, potentially by testing with a lower or higher number of turns.
  • Check the Bedrock account configuration and the global.anthropic.claude-opus-4-7 model settings to ensure they are correctly set up for streaming requests.

Example

No code snippet is provided as the issue lacks specific code details, but reviewing the error handling in the non-streaming fallback might involve checking how the error is caught and handled, for example:

try {
  // non-streaming fallback code
} catch (error) {
  // properly handle the error and provide a meaningful error message
  console.error('Error in non-streaming fallback:', error);
  // display a user-friendly error message
}

Notes

The issue seems to be related to the streaming request and error handling, but without more information about the code and configuration, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Investigate and fix the streaming request closure and error handling issues, as it's unclear if upgrading to a fixed version would resolve the problem without more information.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING