Skip to content

Expected thinking or redacted_thinking but found tool_use #8010

Description

@jbosire-pm

Description

When using Claude models with extended thinking enabled, the API returns a 400 validation error when the model attempts to use tools without a preceding thinking block.

Error Message

400: An error occurred (ValidationException) when calling the ConverseStream operation: 
The model returned the following errors: messages.1.content.0.type: Expected `thinking` or 
`redacted_thinking`, but found `tool_use`. 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).

This wasn't an issue last week so I assume something changed.

Plugins

None

OpenCode version

1.1.14

Steps to reproduce

  1. in an uninitialized project type /init

Screenshot and/or share link

https://opncd.ai/share/lCqFg19t

Operating System

macOS Sequoia 15.7.3

Terminal

Iterm2

Activity

  1. github-actions commented on Jan 12, 2026

    @github-actions
    Contributor

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

    The core issue appears to be that when thinking is enabled on Claude models, the thinking block's signature field is not properly preserved in the message history. When the same message is sent back in subsequent requests, it causes validation errors from the Claude API.

    Feel free to ignore if this specific case differs from the above issues.

  2. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  3. removed
    bugSomething isn't working
    on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions