Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 582 Bytes

File metadata and controls

17 lines (10 loc) · 582 Bytes

thinking-block-repair

Language: python Source: anthropics/claude-code#37485 Estimated lines: 90

Problem

Extended thinking sessions crash with API 400 errors when conversation history replay strips reasoning_content from prior assistant messages containing tool calls.

Solution

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.

Expected Files

["thinking_repair.py","README.md"]