Skip to content

Claude Opus 4.5 (latest) eventually fails: thinking block cannot be modified #13286

@Jonathanm10

Description

@Jonathanm10

Description

When using Claude Opus 4.5 (latest) from Anthropic in OpenCode, conversations eventually fail with a validation error indicating that previously returned thinking / redacted_thinking blocks were modified.

Exact error:

messages.7.content.9: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.

This appears to happen consistently after some conversation length/tool usage (not immediately on first turn).

Impact

  • Session becomes unrecoverable for that turn/model state
  • Prevents continued use of Opus 4.5 in longer real-world sessions

Steps to reproduce

  1. Configure OpenCode to use Anthropic Claude Opus 4.5 (latest)
  2. Start a normal coding session with multiple turns (including tool calls)
  3. Continue until context grows and OpenCode sends follow-up turns
  4. Observe Anthropic validation failure above

Expected behavior

OpenCode should preserve any previously returned thinking blocks exactly as required by Anthropic and continue the session without validation errors.

Actual behavior

Request eventually fails with:

... `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified ...

Notes

Environment

  • Provider: Anthropic
  • Model: Claude Opus 4.5 (latest)
  • OS / terminal / OpenCode version: not yet collected from reporter

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