GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Expected `thinking` or `redacted_thinking` but found `tool_use` · Issue #8010 · anomalyco/opencode

Expected thinking or redacted_thinking but found tool_use #8010

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Expected thinking or redacted_thinking but found tool_use#8010
Copy link
Assignees
thdxr

Description

@jbosire-pm
jbosire-pm
opened on Jan 12, 2026
Issue body actions

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. jbosire-pm
    added
    bugSomething isn't working
    on Jan 12, 2026
  2. github-actions
    assigned
    thdxr
    on Jan 12, 2026
  3. github-actions commented on Jan 12, 2026

    @github-actions
    github-actionsBot
    on Jan 12, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • Expected thinking or redacted_thinking, but found tool_use #3077: Same error message with Claude extended thinking via custom LiteLLM provider
    • Errors with Opus 4.5 through Antigravity that I don't get with Opus 4.5 through Claud Pro #6064: Intermittent errors with Opus 4.5 through Antigravity with thinking enabled
    • Claude extended thinking + tool use: signature not preserved in message history #6176: Root cause analysis - thinking block signature field not preserved in message history
    • [bug] v0.8.0 Introduced thinking block bug with Claude Sonnet 4: "AI_APICallError: messages.3.content.0.type: Expected thinking or redacted_thinking, but found text." #2599: Original thinking block bug from v0.8.0 with Claude Sonnet 4 + tool use

    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.

  4. thdxr commented on Mar 25, 2026

    @thdxr
    thdxr
    on Mar 25, 2026
    Member
    More actions

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

  5. thdxr
    removed
    bugSomething isn't working
    on May 3, 2026
  6. rekram1-node
    closed this as not plannedon May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.