Newer Claude models (Opus 4.8, Sonnet 5) invent extra fields in tool calls, breaking Pi's edit harness
Better Models: Worse Tools
Armin Ronacher found that Claude Opus 4.8 and Sonnet 5 sometimes add invented keys like requireUnique or oldText2 to Pi's edit tool calls, causing schema validation failures. Older models don't do this. In multi-turn agent sessions, Opus 4.8 fails roughly 20% of the time; stripping thinking blocks halves the rate, and strict tool invocation eliminates it. He suspects Anthropic's newer post-training is tuned for Claude Code's own flat edit tool, whose client silently absorbs malformed calls, so the model never gets penalized for inventing extra fields.
Why it matters: Armin Ronacher found the new Claude fabricates fields in the Pi editor tool and fails validation, while older models handle the same task cleanly.