cd /news/large-language-models/better-models-worse-tools · home topics large-language-models article
[ARTICLE · art-48175] src=simonwillison.net ↗ pub= topic=large-language-models verified=true sentiment=↓ negative

Better Models: Worse Tools

Newer Anthropic Claude models, including Opus 4.8 and Sonnet 5, are generating malformed tool calls for Pi's custom edit tool by inventing extra fields, a problem absent in older models. Armin Ronacher suggests this stems from Anthropic's reinforcement learning training for Claude's built-in edit tools, which inadvertently degrades performance on third-party harnesses. The finding raises questions about whether coding tools like Pi must support multiple edit tool schemas to match model-specific optimizations.

read1 min views1 publishedJul 4, 2026

The short version is that newer Claude models sometimes call Pi’s edit tool with extra, invented fields in the nested

edits[] array. And not Haiku or some small model: Opus 4.8. The edit itself is usually correct but the arguments do not match the schema as the model invents made-up keys and Pi thus rejects the tool call and asks to try again.That alone is not too surprising as models emit malformed tool calls sometimes. Particularly small ones. What surprised me is that this is getting worse with newer Anthropic models as both Opus 4.8 and Sonnet 5 show it but none of the older models. In other words, the SOTA models of the family are worse at this specific tool schema than their older siblings.

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.

Claude's edit tool uses search and replace. OpenAI's Codex uses an apply_patch mechanism instead, and OpenAI have talked in the past about how their models are trained to use that tool effectively.

Does this mean third-party coding harnesses like Pi should implement multiple edit tools just so they can use the one with the best performance for the underlying model the user has selected?

Tags: armin-ronacher, ai, openai, generative-ai, llms, anthropic, llm-tool-use, coding-agents, pi

── more in #large-language-models 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/better-models-worse-…] indexed:0 read:1min 2026-07-04 ·