-
Notifications
You must be signed in to change notification settings - Fork 10k
Open
Description
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
- Likely related to message reconstruction/compaction/replay logic for Anthropic thinking blocks.
- Possibly related prior reports: Claude Models Thinking block error #10970 and Expected
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
- Provider: Anthropic
- Model: Claude Opus 4.5 (latest)
- OS / terminal / OpenCode version: not yet collected from reporter
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels