Skip to content

Amazon Bedrock Opus 4.6 compaction failure #14332

Description

@inventumamet

Description

Got error

undefined: The model returned the following errors: messages.3.content.47: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.

Plugins

No response

OpenCode version

1.2.6

Steps to reproduce

  1. Use Claude Opus 4.6 from Amazon with thinking mode turned on using ctrl+t to select variant (i found that using the non-thinking variant avoids this issue)
  2. Use until token is over 170k
  3. Try to compact, and the error appears
    undefined: The model returned the following errors: messages.3.content.47: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.
  4. Compaction not able to proceed
  5. WORKAROUND: Switch to another model on bedrock say Minimax M2, compact works okay, then switch back to Opus 4.6 it will work

Screenshot and/or share link

No response

Operating System

macOS 26.3

Terminal

Zsh (vscode)

Activity

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