Claude Opus 4.8 and Sonnet 5 are failing tool calls that older Claude models handle correctly. Armin Ronacher found that both models inject invented, schema-violating fields into the edits[] array when calling Pi's custom edit tool. The edit content is usually right. The arguments are not. Pi rejects the call and forces a retry.

The likely cause: Anthropic trained newer models via reinforcement learning to use Claude Code's native edit tool more effectively. That tool uses a search-and-replace schema. Pi's schema is different. The models have overfit to Anthropic's internal tooling and now fumble third-party variants. OpenAI's Codex has its own trained behavior too, built around an apply_patch mechanism, not search-and-replace.

The real problem Armin is surfacing is not a single bug. It is a structural one. SOTA models are increasingly shaped by the specific tools their vendors ship, which degrades compatibility with any harness that rolls its own. Read the original for his thinking on whether coding tools like Pi need to implement multiple edit tool variants keyed to the underlying model, and what that would mean for the ecosystem long-term.

[READ ORIGINAL →]