Skip to content

[Bug] Anthropic API Error: Assistant message must start with thinking block when thinking is enabled #11432

@mid0

Description

@mid0

Bug Description
I got an error when running /context (note after seeing this error below, I re-ran /context and it worked)

⎿ Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"messages.137.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.claude.com/en/docs
/build-with-claude/extended-thinking"},"request_id":"req_011CV2TiEdtAHBh1zMdtqd89"}

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.0.36
  • Feedback ID: ea3e39f6-b62a-4c17-b97a-193a7ef2f91e

Errors

[{"error":"Error\n    at Zw (/$bunfs/root/claude:54:1142)\n    at <anonymous> (/$bunfs/root/claude:59:10074)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at spawnSync (unknown)\n    at spawnSync (node:child_process:226:22)\n    at ETT (/$bunfs/root/claude:89:1304)\n    at r$ (/$bunfs/root/claude:89:3610)\n    at read (/$bunfs/root/claude:1645:3023)\n    at request (/$bunfs/root/claude:61:2146)\n    at processTicksAndRejections (native:7:39)\n    at spawnSync (unknown)\n    at spawnSync (node:child_process:226:22)\n    at ETT (/$bunfs/root/claude:89:1304)\n    at r$ (/$bunfs/root/claude:89:3610)\n    at read (/$bunfs/root/claude:1645:3023)\n    at read (/$bunfs/root/claude:1645:2152)\n    at <anonymous> (/$bunfs/root/claude:3736:5915)\n    at A (/$bunfs/root/claude:11:15230)","timestamp":"2025-11-10T20:50:09.039Z"},{"error":"Error: Lock file is already being held\n    at <anonymous> (/$bunfs/root/claude:82:11838)\n    at O (/$bunfs/root/claude:81:5167)\n    at <anonymous> (node:fs:243:13)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-10T20:50:16.493Z"},{"error":"Error: Lock file is already being held\n    at <anonymous> (/$bunfs/root/claude:82:11838)\n    at O (/$bunfs/root/claude:81:5167)\n    at <anonymous> (node:fs:243:13)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-10T20:51:13.024Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at oJ (/$bunfs/root/claude:1003:4395)\n    at <anonymous> (/$bunfs/root/claude:1003:4117)\n    at map (native:1:11)\n    at CI (/$bunfs/root/claude:1003:4109)\n    at fQB (/$bunfs/root/claude:1687:6605)\n    at B7 (/$bunfs/root/claude:101:19663)\n    at T2 (/$bunfs/root/claude:103:42806)\n    at rF (/$bunfs/root/claude:103:38344)\n    at c1 (/$bunfs/root/claude:103:38272)\n    at ZJ (/$bunfs/root/claude:103:38126)","timestamp":"2025-11-10T21:16:54.956Z"},{"error":"Error: Lock file is already being held\n    at <anonymous> (/$bunfs/root/claude:82:11838)\n    at O (/$bunfs/root/claude:81:5167)\n    at <anonymous> (node:fs:243:13)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-10T21:21:32.667Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at oJ (/$bunfs/root/claude:1003:4395)\n    at <anonymous> (/$bunfs/root/claude:1003:4117)\n    at map (native:1:11)\n    at CI (/$bunfs/root/claude:1003:4109)\n    at fQB (/$bunfs/root/claude:1687:6605)\n    at B7 (/$bunfs/root/claude:101:19663)\n    at T2 (/$bunfs/root/claude:103:42806)\n    at rF (/$bunfs/root/claude:103:38344)\n    at c1 (/$bunfs/root/claude:103:38272)\n    at ZJ (/$bunfs/root/claude:103:38126)","timestamp":"2025-11-10T21:26:59.950Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at oJ (/$bunfs/root/claude:1003:4395)\n    at <anonymous> (/$bunfs/root/claude:1003:4117)\n    at map (native:1:11)\n    at CI (/$bunfs/root/claude:1003:4109)\n    at fQB (/$bunfs/root/claude:1687:6605)\n    at B7 (/$bunfs/root/claude:101:19663)\n    at T2 (/$bunfs/root/claude:103:42806)\n    at rF (/$bunfs/root/claude:103:38344)\n    at c1 (/$bunfs/root/claude:103:38272)\n    at ZJ (/$bunfs/root/claude:103:38126)","timestamp":"2025-11-10T21:26:59.951Z"},{"error":"Error: Lock file is already being held\n    at <anonymous> (/$bunfs/root/claude:82:11838)\n    at O (/$bunfs/root/claude:81:5167)\n    at <anonymous> (node:fs:243:13)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-10T21:32:04.797Z"},{"error":"Error: Language not supported while 

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apibugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions