[Bug] Anthropic API Error: Assistant message must start with thinking block
Bug Description
when using the command /context shows this message:
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.97.content.0.type: Expected thinking or redacted_thinking, but f✶uMustering…se. 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.claude.com/en/docs/build-with-claude/extended-thinking"},"request_id":"req_011CW2JN9Zu5uWiDddSNPQb9"}
at generate (/$bunfs/root/claude:411:10428)
at makeRequest (/$bunfs/root/claude:749:5434)
at processTicksAndRejections (native:7:39)
Environment Info
- Platform: darwin
- Terminal: WarpTerminal
- Version: 2.0.67
- Feedback ID: 5ecefef0-eb9e-4219-91b3-574b13ca9daf
Errors
[{"error":"Error: Tool mcp__context7__resolve-library-id not found\n at ViB (/$bunfs/root/claude:2532:547)\n at V3 (/$bunfs/root/claude:172:20693)\n at q4 (/$bunfs/root/claude:172:39061)\n at qn (/$bunfs/root/claude:172:49669)\n at xC (/$bunfs/root/claude:172:85819)\n at QS (/$bunfs/root/claude:172:84799)\n at lV (/$bunfs/root/claude:172:84624)\n at jw (/$bunfs/root/claude:172:81071)\n at ZA (/$bunfs/root/claude:172:6241)\n at iwR (/$bunfs/root/claude:165:4072)","timestamp":"2025-12-12T06:06:06.409Z"},{"error":"Error: Tool mcp__context7__get-library-docs not found\n at ViB (/$bunfs/root/claude:2532:547)\n at V3 (/$bunfs/root/claude:172:20693)\n at q4 (/$bunfs/root/claude:172:39061)\n at qn (/$bunfs/root/claude:172:49669)\n at xC (/$bunfs/root/claude:172:85819)\n at QS (/$bunfs/root/claude:172:84799)\n at lV (/$bunfs/root/claude:172:84624)\n at jw (/$bunfs/root/claude:172:81071)\n at ZA (/$bunfs/root/claude:172:6241)\n at iwR (/$bunfs/root/claude:165:4072)","timestamp":"2025-12-12T06:06:06.409Z"},{"error":"Error: Tool mcp__context7__get-library-docs not found\n at ViB (/$bunfs/root/claude:2532:547)\n at V3 (/$bunfs/root/claude:172:20693)\n at q4 (/$bunfs/root/claude:172:39061)\n at qn (/$bunfs/root/claude:172:49669)\n at xC (/$bunfs/root/claude:172:85819)\n at QS (/$bunfs/root/claude:172:84799)\n at lV (/$bunfs/root/claude:172:84624)\n at jw (/$bunfs/root/claude:172:81071)\n at ZA (/$bunfs/root/claude:172:6241)\n at iwR (/$bunfs/root/claude:165:4072)","timestamp":"2025-12-12T06:06:06.409Z"},{"error":"Error: Tool mcp__context7__resolve-library-id not found\n at ViB (/$bunfs/root/claude:2532:547)\n at V3 (/$bunfs/root/claude:172:20693)\n at q4 (/$bunfs/root/claude:172:39061)\n at qn (/$bunfs/root/claude:172:49669)\n at xC (/$bunfs/root/claude:172:85819)\n at QS (/$bunfs/root/claude:172:84799)\n at lV (/$bunfs/root/claude:172:84624)\n at jw (/$bunfs/root/claude:172:81071)\n at ZA (/$bunfs/root/claude:172:
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗