Language: python Source: anthropics/claude-code#37485 Estimated lines: 90
Extended thinking sessions crash with API 400 errors when conversation history replay strips reasoning_content from prior assistant messages containing tool calls.
A Python CLI that scans conversation JSONL files for assistant messages with tool calls missing reasoning_content blocks, inserting minimal placeholder thinking entries to restore API compatibility.
["thinking_repair.py","README.md"]