| I built a small open-source CLI to recover Claude Code sessions that get stuck on this error: messages.N.content.M: thinking or redacted_thinking blocks in the latest assistant message cannot be modified When this happens, `--resume` can keep failing and the session feels bricked. The tool provides: * diagnose SESSION_ID to find likely corruption points in session JSONL * fix SESSION_ID for targeted repair (auto-backup before write) * nuke SESSION_ID as fallback (strip all thinking/redacted_thinking blocks, also auto-backup) Quick usage: * claude-session-fix-thinking diagnose SESSION_ID * claude-session-fix-thinking fix SESSION_ID * claude --resume SESSION_ID Repo: https://github.com/miteshashar/claude-code-thinking-blocks-f... If you every got stuck due to this, you can use this script to resume your session. |