Skip to content

Error: Invalid signature in thinking block #6418

Description

@rdvo

Description

When changing model mid session from GLM 4.7 or MinMax 2.1 i get this error

messages.19.content.0: Invalid signatureinthinking block

Not sure why, if I toggle back to the first model I was using it works fine.

OpenCode version

1.0.207

Steps to reproduce

  1. Start a new sesson
  2. Send few messages with GLM 4.7 or MinMax 2.1
  3. Switch model to Opus 4.5 via Anthropic
  4. Send message

Will error

Screenshot and/or share link

Image

Operating System

mac os x

Terminal

ghostty

Activity

  1. added
    bugSomething isn't working
    on Dec 30, 2025
  2. github-actions commented on Dec 30, 2025

    @github-actions
    Contributor

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

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

  3. rekram1-node commented on Dec 30, 2025

    @rekram1-node
    Collaborator

    Yeah ik why, I think we have to filter out all reasoning from old model when u switch

  4. rdvo commented on Dec 30, 2025

    @rdvo
    Author

    would there be a way to transform it to the right format or somethin without just stripping it? or is the default behavior to strip thoughts from subsequent messages?

  5. mastternick commented on Jan 2, 2026

    @mastternick

    I can confirm this issue as well:

    Description:
    An error occurs when switching to Anthropic models during an active session and sending a message after switching.|

    Steps to reproduce:

    1. Connect to the Anthropic provider using the Pro subscription option
    2. Start chat with non-Anthropic model (e.g., Grok)
    3. Switch to any Anthropic model (Claude Sonnet 4.5 or Opus)
    4. Try to send a message or switch models

    Error message:
    messages.1.content.0: Invalid signature in thinking block

  6. vieenrose commented on Jan 6, 2026

    @vieenrose

    I made a Session Repair Tool on this issue.

  7. mounan commented on Jan 18, 2026

    @mounan

    I hit this Corrupted thought signature. error when I switch from google provider to manul api token

  8. MrGuardian commented on Feb 2, 2026

    @MrGuardian

    I have this too. I'm not using Anthropic subscription directly, I do it via Github Copilot subscription.

    Steps I did before getting the same error (all models from Github Copilot):

    1. Plan with Gemini 3 Pro Preview
    2. Switch to Build Claude Sonnet 4.5 thinking.
    3. Type "Build it".

    Got this error messages.1.content.0: Invalid `signature` in `thinking` block.
    Using opencode version 1.1.48 in vs code.

  9. DerekCorniello commented on Feb 3, 2026

    @DerekCorniello

    just now getting this same error on opus 4.5 and sonnet through github copilot sub. Using v1.1.48 on kitty with hyprland/arch

  10. added a commit that references this issue on Feb 3, 2026
    f1baa87
  11. rekram1-node commented on Feb 3, 2026

    @rekram1-node
    Collaborator

    This was fixed for all models a while ago, but for github copilot there was a separate issue that is fixed in dev.

    Release should go out tonight

  12. Wenbobobo commented on Feb 10, 2026

    @Wenbobobo

    This was fixed for all models a while ago, but for github copilot there was a separate issue that is fixed in dev.

    Release should go out tonight

    Image hi,After GitHub crashed and was restored, I just restarted and seemed to encounter this [Error: Invalid signature in thinking block] issue again.
  13. geekgil commented on Feb 10, 2026

    @geekgil

    I can confirm that this bug in switching between models in the same session with Github Copilot subscription integration came back. I've got an error similar to @Wenbobobo 's one (messages.21.content.0: Invalid 'signature' in 'thinking' block) when switching from gemini-3-pro-preview to claude-opus-4.6 in opencode 1.1.53 installed in Pop!_OS 24.04 running in Cosmic Terminal.

    Image

    The issue seems to happen only in the same execution. I closed opencode CLI client, opened it again, resumed the session, and resent the last prompt and it worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions