
Claude Code v2.1.239|Bedrock で API 課金が 2 倍になっていた|毎日Changelog解説Claude Code v2.1.239 fixes a bug where streaming requests blocked by a Bedrock…
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy
- Bedrockのプロキシがストリーミングをブロックした際に非ストリーミングで再送し、APIコールが2倍課金されていたバグがv2.1.239で修正された。
- コスト面で影響が大きい不具合の解消であり、Bedrock利用者は注目すべき内容。
- Claude Code v2.1.239 fixes a bug where streaming requests blocked by a Bedrock proxy were silently retried as non-streaming calls, doubling billable API usage each turn.
- Bedrock users should update promptly to avoid excess charges.
本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (qiita.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (qiita.com).
要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.
Anthropicが提供するコマンドライン向けAIコーディング支援ツール「Claude Code」のv2.1.239がリリースされ、Amazon Bedrock経由での利用時に課金対象のAPI呼び出しが実質2倍に膨らんでいた不具合が修正された。コスト面の影響が大きいため、Bedrockを通じてClaude Codeを利用しているユーザーは特に注目したいアップデートだ。
問題となっていたのは、Bedrock経由のストリーミング通信がプロキシによってブロックされたケースだ。本来、Claude Codeはモデルの応答を逐次受け取るストリーミング方式でリクエストを送るが、間に挟まるプロキシがこれを阻んだ場合、ツール側が毎ターンごとに非ストリーミング方式でリクエストを投げ直していた。この再送によって、1回のやり取りで課金対象となるAPI呼び出しが二重に発生し、結果として利用が2倍に膨らむ状態になっていたと見られる。
ストリーミングとは、生成結果を最後まで待たずにトークン単位で順次表示する仕組みで、対話型ツールの体感速度を高めるために広く使われている。企業環境では通信の監査やセキュリティ確保のためにプロキシを介する構成が一般的であり、そうしたプロキシがストリーミングを許可していない場合に今回の二重課金が起きていた可能性がある。ユーザーからは表面上、単に応答が返ってくるだけに見えるため、余分な課金に気づきにくかった点も問題を根深くしていたと考えられる。
Amazon Bedrockは、Anthropicのモデルを含む複数の基盤モデルをAPI経由で利用できるAWSのマネージドサービスだ。Claude CodeはAnthropicの直接APIのほか、Bedrockなど複数の経路でも動作するが、こうした複数バックエンドへの対応は柔軟性を高める一方で、経路ごとの通信条件の違いが今回のような不具合の温床になりやすい面もある。
Claude Codeは頻繁に更新が重ねられており、公式のChangelogでは各バージョンの修正内容が公開されている。今回のように課金へ直結する修正は影響範囲が読みにくいため、Bedrock利用者は早めに最新版へ更新し、想定外の請求を避けることが望ましいだろう。
Anthropic has shipped Claude Code v2.1.239, a maintenance release whose most consequential change is a fix for a billing bug that affected users running the tool through Amazon Bedrock. According to the official changelog, the update resolves a scenario in which streaming requests blocked by a Bedrock proxy were silently retried as non-streaming calls, causing billable API usage to double on every turn. For teams that route Claude Code traffic through Bedrock, the fix is worth applying promptly, because the underlying defect had a direct and easily overlooked cost impact.
The problem stemmed from how Claude Code handled a failed streaming connection. Claude Code, Anthropic's command-line agent for software development tasks, normally requests model output as a stream, receiving tokens incrementally as they are generated. In some Bedrock deployments a proxy sitting between the client and the service would block that streaming connection. Rather than surfacing the failure, the client appears to have fallen back to a non-streaming request for the same turn. The result was that a single interaction generated two billable API calls instead of one, and because this happened on each turn, the extra charges accumulated across a session without any obvious signal to the user.
The reason this matters specifically for Bedrock users comes down to how the platform is billed and deployed. Amazon Bedrock is AWS's managed service for foundation models, and it offers Anthropic's Claude family among its available models. Organizations often choose Bedrock so that model traffic stays inside their AWS account and existing governance boundaries, and enterprise networks frequently enforce outbound traffic through proxies for security and monitoring. Those same proxies can interfere with long-lived streaming connections, which typically rely on server-sent events or similar mechanisms that some proxy configurations do not pass through cleanly. That combination is exactly the condition under which this bug would trigger, so it was likely most visible in corporate or regulated environments rather than in simple direct-to-API setups.
Doubling billable usage is a meaningful issue because token-based pricing scales with every request. When each turn quietly produced a redundant non-streaming call, the affected accounts would have paid roughly twice the expected amount for those interactions. The behavior was also easy to miss: the tool continued to work, output still appeared, and the only symptom was a higher-than-anticipated bill. Cost anomalies of this kind can be difficult to trace back to a specific client behavior, which is part of why a changelog entry calling it out explicitly is useful for anyone reconciling recent Bedrock spend.
For context, Claude Code has been iterating rapidly, and the granular version number here reflects a fast release cadence in which small fixes and refinements ship frequently. That pace is common for developer tooling, but it also means users benefit from watching the changelog, since fixes like this one can carry real financial or operational significance even when a release is otherwise routine. The Qiita source that surfaced this item is one of several community efforts that translate and annotate Anthropic's official changelog shortly after publication, which helps non-English-speaking developers keep up with changes that might otherwise be buried in terse release notes.
It is also worth noting that Bedrock is not the only way to run Claude Code against a managed backend. Anthropic supports its own direct API, and Claude models are additionally available through Google Cloud's Vertex AI, giving teams a choice of hosting and billing arrangements depending on their existing cloud commitments. The proxy-related failure described here is tied to the Bedrock path, so users on other backends are unlikely to have been affected in the same way, though the general lesson about how streaming fallbacks can inflate usage applies broadly.
Practically, users on Bedrock should update to v2.1.239 or later to ensure that a blocked stream no longer triggers a duplicate non-streaming request. Teams that suspect they were affected may want to review their recent Bedrock invoices for unexplained increases that align with periods of heavy Claude Code activity. As always with a single changelog entry, the precise internal mechanics are described only briefly, so the summary above reflects the behavior as reported rather than a full technical postmortem.
ポコとTECHガイドPoko & TECH Guide
ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.
- ポコPokoストリーミングがプロキシにブロックされて再送って、つまりどういうこと?What does it mean that the proxy blocked streaming and the request was retried?
- TECHガイドTECH Guide簡単に言うとじゃな、記事によれば、返答を順次受け取る通信が阻まれると、通常方式でもう一度APIを呼んでいたんじゃよ。Simply put, the article says that when the proxy blocked a response delivered progressively, Claude Code called the API again using non-streaming mode.
- ポコPokoそれで毎ターンの課金対象が2倍になっていたの? 修正されると何が嬉しいの?So every turn generated twice the billable usage? What’s the benefit of the fix?
- TECHガイドTECH Guideその通りじゃ。記事では、v2.1.239で余分な再送を生むバグが直り、過剰な料金を避けられるとしておる。That’s right. According to the article, v2.1.239 fixes the bug causing the extra retry, helping users avoid excess charges.
- ポコPokoつまり、Bedrock経由だと気づかないうちにAPI呼び出しが倍になっていたけど、今回直ったんだね。Got it—the API calls could silently double through Bedrock, and this release fixes that.
- TECHガイドTECH Guideうむ。Bedrock利用者は余分な課金を避けるため、v2.1.239への更新に注目じゃな。Exactly. The article says Bedrock users should update to v2.1.239 promptly to avoid unnecessary charges.


