[BUG] API Error 400: Invalid 'text' content - Expected 'thinking' block
Status Fixed / completed
Maintainer reply None cached
Activity 14 comments · opened May 19, 2025 · closed May 21, 2025
This happens _sometimes_ on random prompts in TUI. Since the latest 0.2.120 update.
I say random because sometimes I have thinking trigger words in the prompts, sometimes I don't. In both cases I will get this error:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"me
ssages.1.content.0.type: Expected `thinking` or `redacted_thinking`, but found
`text`. When `thinking` is enabled, a final `assistant` message must start with a
thinking block (preceeding the lastmost set of `tool_use` and `tool_result` blocks).
We recommend you include thinking blocks from previous turns. To avoid this
requirement, disable `thinking`. Please consult our documentation at
https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking"}}
Usually I can just resend the prompt and it works. Thinking still works in this case as well.
Same issue as AI slop bugs: #1174 #1167
14 Comments
Running
/loginfixed it: https://github.com/anthropics/claude-code/issues/1167#issuecomment-2891409005Edit: as others are pointing out, this doesn't actually fix it. Just a coincidence I happened to stop pressing escape after running /login.
was about to say I have the same issue and occurs when interjecting claude using esc . I will try this but would be good to know what the cause was. thanks!
/loginhas not fixed it for me.Again seeing: (this wasn't a thinking-triggered prompt)
I see this consistently after I hit
escto interrupt@junoatwork yea
same - consistent pattern identified.
Having the same issue, typically after saying 'no' and then giving my new instructions, but it could also be after i hit esc.
This is now basically every command after I hit
escand reprompt with clarification.Super annoying
the login comment above doesn't fix this .
Can reproduce the bug every single time by clicking esc .
Are you an api user or max plan? wondering / sincerely hope it's not something affecting max plan users only.
i have this error with max plan, didnt hit escape, only hit No, then typed my changes i wanted, then it appears. not always though!
We think this should be fixed in the latest version. Please update and reopen this ticket if you run into it again!
Still running into this on the latest version. Happens frequently if I hit 'esc' during some active thinking/processing.
If I quit, and
claude --continueit will still be broken also. I have to start a new session.Haven't seen this error since closed FYI.
Have
every time using thinking mode after 60-120 seconds after initial promt. WSL, VS Code, Win11
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.