Skip to content
Models · Jul 5, 2026

Newer Anthropic models increasingly emit malformed tool calls for third-party edit schemas

Opus 4.8 and Sonnet 5 sometimes invent extra fields in nested edit-tool arguments, breaking compatibility with non-Claude harnesses like Pi.

Trust79
HypeLow hype

1 source · cross-referenced

ShareXLinkedInEmail
TL;DR
  • Newer Anthropic models (Opus 4.8, Sonnet 5) sometimes add invented keys to the edits[] array when calling third-party edit tools, causing schema validation failures.
  • Older Anthropic models did not exhibit this issue, suggesting a regression tied to RL-based tool-use training.
  • Claude’s built-in edit tool uses search-and-replace; OpenAI’s Codex uses an apply_patch mechanism, reflecting differing tool-use training approaches.

Armin Ronacher reports that Anthropic’s Opus 4.8 and Sonnet 5 models sometimes call the edit tool in the Pi coding harness with extra, invented fields in the nested edits[] array. The edit itself is usually correct, but the added keys do not match the schema, causing Pi to reject the tool call and request a retry.

This issue is not present in older Anthropic models, indicating a regression that correlates with newer releases. Armin hypothesizes the regression stems from reinforcement learning that optimized models for Claude Code’s built-in edit tool, which uses a search-and-replace mechanism, rather than third-party harnesses with different schemas.

Claude’s edit tool uses search and replace, while OpenAI’s Codex uses an apply_patch mechanism. OpenAI has previously discussed training models specifically to use apply_patch effectively, highlighting divergent tool-use training approaches across providers.

The phenomenon raises a practical question for third-party harnesses like Pi: whether to implement multiple edit tools so users can select the variant best supported by their underlying model.

Sources
  1. 01Simon Willison’s WeblogBetter Models: Worse Tools
Also on Models

Stories may contain errors. Dispatch is assembled with AI assistance and curated by human editors; despite the trust-score filter, mistakes happen. We correct publicly — every article links to its revision history. Nothing here is financial, legal, or medical advice. Verify before relying on any claim.

© 2026 Dispatch. No ads. No sponsorships. No paid placement. Reader-supported via Ko-fi.

Built by a person who cares about honest AI news.