[BUG] Session resume fails with "Invalid signature in thinking block" - thinking block signatures not persisted
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When resuming a session, the API rejects the request with:
API Error: 400 - "messages.1.content.0: Invalid signature in thinking block"
The session JSONL file contains 537 thinking blocks where 534 have completely empty/missing signatures and 3 have truncated 24-character signatures (valid signatures are much longer). This makes the session impossible to resume.
What Should Happen?
Claude Code should persist valid cryptographic signatures on thinking blocks when saving session data to the JSONL file. If valid signatures are not available at save time, thinking blocks should be stripped from the saved session so that resume doesn't fail. Sessions with extensive conversation history should remain resumable.
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.7.content.0: Invalid signature in thinking block"},"request_id":"req_011CXbwaX1EekwK9equ1sc7j"}
Steps to Reproduce
Create a session with Anthropic Claude plan and continue to use it with GLM backend then come back to anthropic backend - this is 100% reproducible.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.23 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗