1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Claude CodeでAPI Error: Response stalled mid-stream. The response above may be incomplete.が出る

1
Posted at

はじめに

Claude Codeで開発していると、たまに以下のエラーが発生しました。

Version: 2.1.205

API Error: Response stalled mid-stream. The response above may be incomplete.

このエラーが発生すると、continueしても/rewindしても、同じエラーが返ってきます。

暫定対処

毎回、5分5秒くらいで発生していたので、一旦タイムアウト時間を伸ばしてみています。
~/.claude/settings.jsonに以下の設定を追加して、Claude Codeを再度立ち上げます。

~/.claude/settings.json
{
  "env": {
    "API_TIMEOUT_MS": "1200000",
    "CLAUDE_STREAM_IDLE_TIMEOUT_MS": "600000"
  }
}

まとめ

おそらくサーバーからのレスポンスが返ってくる前に、タイムアウトになったのかなと推察しますが、
/resumecontinueで再開するとエラーは一旦なくなったので、様子見しています。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?