API Error 400 - thinking blocks modified when resuming agent
Resolved 💬 3 comments Opened Jan 29, 2026 by amucunguzi Closed Feb 2, 2026
Description
When running a Task agent, I encountered this error:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.11.content.1: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response."},"request_id":"req_011CXbbEmykjoXGsScGqtu7C"}
Expected behavior
The agent should either:
- Successfully resume without corrupting thinking blocks, or
- Gracefully handle the error and offer to start fresh
Environment
- OS: macOS (Darwin 25.2.0)
- Model: claude-opus-4-5-20251101
Additional context
This appears to happen when conversation history gets out of sync, possibly due to context management or an interrupted request.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗