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
- Configure OpenCode to use Anthropic Claude Opus 4.5 (latest)
- Start a normal coding session with multiple turns (including tool calls)
- Continue until context grows and OpenCode sends follow-up turns
- 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
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_thinkingblocks were modified.Exact error:
This appears to happen consistently after some conversation length/tool usage (not immediately on first turn).
Impact
Steps to reproduce
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:
Notes
thinkingorredacted_thinkingbut foundtool_use#8010 (similar thinking-block ordering/validation failures), but this report is the explicit "cannot be modified" variant on latest Opus 4.5.Environment