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?

【ClaudeCode】API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011CVF8QZHdiq65PR7YHMe2v"}の解決方法

Posted at

はじめに

ClaudeCodeを以前はVolta経由でインストールしていましたが、不具合が多かったため今回はHomebrewで再インストールしました。

この記事は個人的なアウトプットを目的として作成したものです。そのため、誤った情報や不足している内容が含まれている可能性があります。もし間違いや気になる点がございましたら、ぜひご指摘いただけますと幸いです

現象

HomebrewClaudeCodeをインストールし、コマンドからClaudeCodeに指示を送ろうとしたところ、以下のエラーが発生しました。

API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011CVF8QZHdiq65PR7YHMe2v"}

一見すると「Claude 側のサーバーエラー(500)」のように見えますが、実際は別の原因でした。

原因

Homebrewインストールに切り替えると、

  • 実行パスが変わる
  • claude CLI の設定ディレクトリが変わる

などが理由で、認証状態がリセットされることがあるようです。

そのため、Voltaでログイン済みだったとしても、Homebrewで入れ直すと再度ログインが必要になります。

解決方法

下記のコマンドでログインし直すことで解決します。

claude "/login"

ログイン後に再度コマンドを実行すると、問題なく動作するはずです。

終わりに

今回のケースは「500エラー」という見た目に惑わされましたが、実際はシンプルな 認証未完了の問題でした。

参考

『Claude Pro($20)プランでゼロから始めるClaude Code』Zenn

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?