Claude Models Thinking block error #7824

Open
opened 2026-02-16 18:08:22 -05:00 by yindo · 7 comments
Owner

Originally created by @tungdapoet on GitHub (Jan 28, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

This error happens when start writing tools, or streaming in thinking block

Image

Plugins

oh-my-opencode

OpenCode version

Any version

Steps to reproduce

Ask agent to write something

Screenshot and/or share link

No response

Operating System

macOS 26.1

Terminal

No response

Originally created by @tungdapoet on GitHub (Jan 28, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description This error happens when start writing tools, or streaming in thinking block ![Image](https://github.com/user-attachments/assets/44443c9b-127f-4d44-9881-0c130a89513e) ### Plugins oh-my-opencode ### OpenCode version Any version ### Steps to reproduce Ask agent to write something ### Screenshot and/or share link _No response_ ### Operating System macOS 26.1 ### Terminal _No response_
yindo added the bug label 2026-02-16 18:08:22 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 28, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #8010: Expected thinking or redacted_thinking but found tool_use (similar error on macOS)
  • #6176: Claude extended thinking + tool use: signature not preserved in message history (oh-my-opencode plugin)
  • #2599: Thinking block bug with Claude Sonnet 4 (same API validation error after tool invocation)
  • #9364: Claude Extended Thinking: assistant message content order causes API error (root cause analysis)
  • #3077: Expected thinking or redacted_thinking, but found tool_use (recurring error)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 28, 2026): This issue might be a duplicate of existing issues. Please check: - #8010: Expected `thinking` or `redacted_thinking` but found `tool_use` (similar error on macOS) - #6176: Claude extended thinking + tool use: signature not preserved in message history (oh-my-opencode plugin) - #2599: Thinking block bug with Claude Sonnet 4 (same API validation error after tool invocation) - #9364: Claude Extended Thinking: assistant message content order causes API error (root cause analysis) - #3077: Expected `thinking` or `redacted_thinking`, but found `tool_use` (recurring error) Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Feb 4, 2026):

what provider?

@rekram1-node commented on GitHub (Feb 4, 2026): what provider?
Author
Owner

@carlesandres commented on GitHub (Feb 4, 2026):

This is happening to me while I am building with opencode/gpt-5.2-codex as my primary BUILD agent and I run a /commit command which is bound to github-copilot/claude-sonnet-4.5

---
description: Commit changes with conventional commit format
model: github-copilot/claude-sonnet-4.5
---

Analyze code changes and create well-structured git commits following conventional commit standards.

EDIT: Actually no. Apologies. This is what's happening to me. I will open a separate issue.

Image
@carlesandres commented on GitHub (Feb 4, 2026): This is happening to me while I am building with `opencode/gpt-5.2-codex` as my primary BUILD agent and I run a `/commit` command which is bound to `github-copilot/claude-sonnet-4.5` ```md --- description: Commit changes with conventional commit format model: github-copilot/claude-sonnet-4.5 --- Analyze code changes and create well-structured git commits following conventional commit standards. ``` EDIT: Actually no. Apologies. This is what's happening to me. I will open a separate issue. <img width="1218" height="238" alt="Image" src="https://github.com/user-attachments/assets/0d9bb87a-de5d-4d88-b5d8-c1fdecaf54c4" />
Author
Owner

@rekram1-node commented on GitHub (Feb 4, 2026):

@carlesandres what version are u using? There was a bug specifically for the github copilot provider but it should be fixed now

@rekram1-node commented on GitHub (Feb 4, 2026): @carlesandres what version are u using? There was a bug specifically for the github copilot provider but it should be fixed now
Author
Owner

@carlesandres commented on GitHub (Feb 4, 2026):

@rekram1-node I'm not too sure because I have updated to the latest now. I'll see if I can replicate it and I'll report back if it's still an issue.

@carlesandres commented on GitHub (Feb 4, 2026): @rekram1-node I'm not too sure because I have updated to the latest now. I'll see if I can replicate it and I'll report back if it's still an issue.
Author
Owner

@DonaldoDes commented on GitHub (Feb 5, 2026):

This is happening to me while I am building with opencode/gpt-5.2-codex as my primary BUILD agent and I run a /commit command which is bound to github-copilot/claude-sonnet-4.5


description: Commit changes with conventional commit format
model: github-copilot/claude-sonnet-4.5

Analyze code changes and create well-structured git commits following conventional commit standards.
EDIT: Actually no. Apologies. This is what's happening to me. I will open a separate issue.

Image

@carlesandres I had the exact same issue with Anthropic this the reason why I submitted the PR #12131 . If you need a quick workaround, you can simply disable the thinking mode.

@DonaldoDes commented on GitHub (Feb 5, 2026): > This is happening to me while I am building with `opencode/gpt-5.2-codex` as my primary BUILD agent and I run a `/commit` command which is bound to `github-copilot/claude-sonnet-4.5` > > --- > description: Commit changes with conventional commit format > model: github-copilot/claude-sonnet-4.5 > --- > > Analyze code changes and create well-structured git commits following conventional commit standards. > EDIT: Actually no. Apologies. This is what's happening to me. I will open a separate issue. > > <img alt="Image" width="1218" height="238" src="https://private-user-images.githubusercontent.com/203221/545125708-0d9bb87a-de5d-4d88-b5d8-c1fdecaf54c4.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzAzMDIwMDAsIm5iZiI6MTc3MDMwMTcwMCwicGF0aCI6Ii8yMDMyMjEvNTQ1MTI1NzA4LTBkOWJiODdhLWRlNWQtNGQ4OC1iNWQ4LWMxZmRlY2FmNTRjNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMjA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDIwNVQxNDI4MjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wYzdhMWQ2YjFlOTE4ZWE1YTQzZjQ5MmMwOTY4YjU4NDY2YzA2YWQyMzIyNTU2ZjNkZmE4NzUzN2Y3MTVjMDAwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.eN2Kl5pyp-Ky9ZvXRkWn6P7uflPgvNswU1y_vd_j8-k"> @carlesandres I had the exact same issue with Anthropic this the reason why I submitted the PR #12131 . If you need a quick workaround, you can simply disable the thinking mode.
Author
Owner

@carlesandres commented on GitHub (Feb 6, 2026):

Thanks @DonaldoDes. I've not come across the issue in recent versions, but it's good to know about that PR and the workaround.

@carlesandres commented on GitHub (Feb 6, 2026): Thanks @DonaldoDes. I've not come across the issue in recent versions, but it's good to know about that PR and the workaround.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7824