[Bug] Anthropic API Error: Assistant message thinking block must be first

Resolved 💬 7 comments Opened Jan 25, 2026 by abose Closed Mar 1, 2026

Bug Description
I cant use claude code in linux or mac, all getting error-ed out with API Error (I'm on the MAX plan):

 400 {"type":"error","error":{"type":"invalid_request_error","message":"m
    essages.5.content.0: If an assistant message contains any thinking blocks, the     
    first block must be `thinking` or `redacted_thinking`. Found                       
    `text`."},"request_id":"req_011CXTPxYCGvoJZ711qbqL1F"}  

If i disable thinking from config, it works. It looks like an account elevl issue as i have it in both my Linux and mac machines.

Environment Info

  • Platform: linux
  • Terminal: pycharm
  • Version: 2.1.19
  • Feedback ID: 3bfa7a6e-69c3-4628-b9f3-c1c2dcfba112

Errors

[{"error":"Error: ENOENT: no such file or directory, scandir '/etc/claude-code/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:1903)\n    at pJ (/$bunfs/root/claude:11:35427)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at XY$ (/$bunfs/root/claude:2213:380)\n    at XY$ (/$bunfs/root/claude:2213:1350)\n    at <anonymous> (/$bunfs/root/claude:2213:4440)\n    at <anonymous> (/$bunfs/root/claude:2213:5171)\n    at A (/$bunfs/root/claude:11:7251)\n    at Z71 (/$bunfs/root/claude:4860:4342)","timestamp":"2026-01-25T03:28:06.698Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/home/home/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:1903)\n    at pJ (/$bunfs/root/claude:11:35427)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at XY$ (/$bunfs/root/claude:2213:380)\n    at XY$ (/$bunfs/root/claude:2213:1350)\n    at <anonymous> (/$bunfs/root/claude:2213:4483)\n    at <anonymous> (/$bunfs/root/claude:2213:5171)\n    at A (/$bunfs/root/claude:11:7251)\n    at Z71 (/$bunfs/root/claude:4860:4342)","timestamp":"2026-01-25T03:28:06.698Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.0: If an assistant message contains any thinking blocks, the first block must be `thinking` or `redacted_thinking`. Found `text`.\"},\"request_id\":\"req_011CXTPxYCGvoJZ711qbqL1F\"}\n    at generate (/$bunfs/root/claude:143:37450)\n    at makeRequest (/$bunfs/root/claude:160:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-25T03:36:14.831Z"}]

View original on GitHub ↗

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