Mechanism◆Article
Newer Anthropic models have been specifically trained, presumably via reinforcement learning, to better use the edit tools baked into Claude Code, and this makes them more likely to misuse the differently-shaped custom edit tools of other coding harnesses like Pi.
Armin's theory for the regression: Anthropic has likely RL-trained recent models heavily on Claude Code's own edit tool, which inadvertently degrades their ability to correctly use differently-designed edit tools in third-party harnesses like Pi. ✦ AI generated
Armin Ronacher · Simon Willison's Weblog · 2026-07-04 · original ↗
Armin theorizes that this is because more recent Anthropic models have been specifically trained (presumably via Reinforcement Learning) to better use the edit tools that are baked into Claude Code. This has the unfortunate effect that other coding harnesses, such as Pi, may find that their own custom edit tools are more likely to be used incorrectly.
Read full article ↗excerpt · fair-use quotation
- ·Newer Anthropic models trained to use Claude Code's own edit tools
- ·Likely done via reinforcement learning, says Armin Ronacher
- ·Training shapes models around Claude Code's specific tool design
- ·Other harnesses like Pi use differently-shaped edit tools
- ·Models are more likely to misuse those custom tools
- ·Claude Code-specific training doesn't generalize well
Around this claim
Evidence · 2
Claude's edit tool is built around search-and-replace, whereas OpenAI's Codex uses an apply_patch mechanism instead, and OpenAI has publicly discussed training its models specifically to use that apply_patch tool well.Simon Willison · Simon Willison's Weblog · conf 60%It is specifically the newest, state-of-the-art Claude models — Opus 4.8 and Sonnet 5 — that show this malformed-tool-call problem, while none of the older models do, meaning the SOTA models are worse at this particular tool schema than their older siblings.Armin Ronacher · Simon Willison's Weblog · conf 60%
Extends · 2
It is specifically the newest, state-of-the-art Claude models — Opus 4.8 and Sonnet 5 — that show this malformed-tool-call problem, while none of the older models do, meaning the SOTA models are worse at this particular tool schema than their older siblings.Armin Ronacher · Simon Willison's Weblog · conf 70%Third-party coding harnesses like Pi may need to implement multiple edit tools so they can use whichever one performs best for the specific underlying model the user has selected.Simon Willison · Simon Willison's Weblog · conf 60%
This moment responds to
explains mechanism → Newer Claude models — including the flagship Opus 4.8, not just small models — sometimes call Pi's edit tool with extra, invented fields in the nested edits[] array, so the arguments fail to match the schema and Pi rejects the tool call and asks for a retry.Armin Ronacher · Simon Willison's Weblogexplains mechanism → It is specifically the newest, state-of-the-art Claude models — Opus 4.8 and Sonnet 5 — that show this malformed-tool-call problem, while none of the older models do, meaning the SOTA models are worse at this particular tool schema than their older siblings.Armin Ronacher · Simon Willison's Weblog