Summary
Compacting an autoresearch session fails on the first attempt with: "The model returned the following errors: messages.3.content.2: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response." Retrying immediately succeeds.
Context
harmoniqs.amicode@0.3.0; Darwin 25.6.0 arm64; engine base v1.18.10-amicode.17 (harmoniqs/opencode). Observed during an autoresearch session compaction.
Expected vs actual
- Expected: Compaction succeeds on the first attempt.
- Actual: First attempt errors because the compaction pass mutates or reorders
thinking/redacted_thinking blocks in the latest assistant message before sending to the API. A second attempt works (likely because the errored message is dropped or the thinking blocks are no longer the "latest" after the retry).
Diagnostics
- macOS 25.6.0 arm64, extension v0.3.0, engine v1.18.10-amicode.17
- error source: Anthropic API 400 response rejecting modified thinking blocks
intake: not-ready — mature per the maturity contract before picking up
suggested_path: A
diagnostics: inline
upstream: anomalyco/opencode#41738 (open), anomalyco/opencode#39291 (open)
Summary
Compacting an autoresearch session fails on the first attempt with: "The model returned the following errors: messages.3.content.2:
thinkingorredacted_thinkingblocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response." Retrying immediately succeeds.Context
harmoniqs.amicode@0.3.0; Darwin 25.6.0 arm64; engine base v1.18.10-amicode.17 (harmoniqs/opencode). Observed during an autoresearch session compaction.
Expected vs actual
thinking/redacted_thinkingblocks in the latest assistant message before sending to the API. A second attempt works (likely because the errored message is dropped or the thinking blocks are no longer the "latest" after the retry).Diagnostics
intake: not-ready — mature per the maturity contract before picking up
suggested_path: A
diagnostics: inline
upstream: anomalyco/opencode#41738 (open), anomalyco/opencode#39291 (open)