Thursday, October 22, 2026|20°C Partly Cloudy
Next edition scheduled
Your Personal Daily Intelligence
Edition 2026-07-05

TECHNOLOGY

New Claude Models Produce Invalid Tool Calls for Pi Edit Function

Newer Claude models such as Opus 4.8 and Sonnet 5 have been observed to generate malformed tool calls when invoking Pi's edit function.

By Hacker News · 110d ago · Source: Hacker News

Full article

Newer Claude models such as Opus 4.8 and Sonnet 5 have been observed to generate malformed tool calls when invoking Pi's edit function. They add keys that do not match the expected schema. The edit tool expects a path parameter and an edits array containing objects with oldText and newText fields. Validation rejects calls that contain additional properties. Across multiple test runs, the newer models produced extra fields such as requireUnique, type, id, or children, causing the tool call to fail. The issue was reproduced in an agentic session where the model had read files and composed a multi‑line edit, occurring in roughly 20 % of attempts. Earlier versions of the model, including Opus 4.5, did not show this behavior. The author hypothesizes that the issue stems from post‑training that exposed the model to Claude Code’s edit tool, which uses a flatter schema and tolerates additional parameters. Reinforcement learning in that environment may reward successful completion despite schema deviations, leading the model to learn a broader set of acceptable keys. Strict mode in the tool invocation interface appears to eliminate the problem by preventing sampling of unsupported fields. The case illustrates that tool schemas are not neutral for all model families and that harness developers may need more explicit schema validation to ensure compliance.

Source transparency

Publisher
Hacker News
Reliability
high
Published
7/5/2026, 10:00:37 AM
Retrieved
7/5/2026, 10:00:37 AM
Relevance
80%
Confidence
85%
Read original at Hacker News

Botwin's Morning Wire publishes the full source article for reading convenience. Please visit the publisher for the original presentation and any updates.