Close Menu
WithO2WithO2

    Subscribe to Updates

    Get the latest AI News Tools Updates in your Inbox

    What's Hot

    Claude Sonnet 5 Is Breaking Tool Calls — Here’s the Data

    July 8, 2026

    Microsoft’s 2.5B AI Bet Just Made Amazon’s Look Small

    July 8, 2026

    Best HRMS Software 2026: Top 10 HR Systems Compared

    July 8, 2026

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    WithO2WithO2
    • AI
    • Blog
    • Business Software
    • Trending News
    • Stories
    WithO2WithO2
    Home » AI
    AI

    Claude Sonnet 5 Is Breaking Tool Calls — Here’s the Data

    By Amitabh SarkarJuly 8, 2026Updated:July 8, 20267 Mins Read0
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Claude Sonnet 5 tool calling bug — schema field hallucination breaking agentic workflows
    Claude Sonnet 5 and Opus 4.8 hallucinate schema fields in tool calls, breaking agentic AI pipelines.
    Share
    Facebook Twitter LinkedIn Pinterest Email

    A Claude Sonnet 5 tool calling regression has left developers debugging silent API failures: both Sonnet 5 and Opus 4.8 invent non-existent schema fields in tool calls, breaking agentic workflows that worked correctly on older Claude versions. Flask creator Armin Ronacher documented the regression on July 4, showing the models substitute internal priors for the provided schema definition.

    Armin Ronacher — the Python developer behind Flask, Jinja2, Click, and Rye — published data on July 4 showing that Claude Sonnet 5 and Opus 4.8 invent fields that don’t exist in a tool’s schema, causing API rejections in production agentic systems. Ronacher’s post “Better Models, Worse Tools” hit 138 points on Hacker News within hours and drew independent confirmation from Let’s Data Science. Anthropic has not acknowledged the issue in its release notes as of this writing.

    The failure is not hypothetical. Ronacher documents his editing tool for Pi (his AI assistant project) — Sonnet 5 and Opus 4.8 call the tool with correct content but with invented field names that don’t exist in the schema, causing the call to be rejected. The same schemas work correctly on all older Claude models.

    Table of Contents

    Toggle
    • The Tool Calling Regression Ronacher Found — and Why Developers Are Alarmed
    • Why Smarter Models Are Making This Worse, Not Better
    • Older Claude Models Are Fine — the Tool Calling Regression Is Version-Specific
    • What Developers Can Do Right Now
    • Frequently Asked Questions

    The Tool Calling Regression Ronacher Found — and Why Developers Are Alarmed

    Claude Sonnet 5 tool calling regression — Armin Ronacher's Better Models Worse Tools analysis
    Armin Ronacher’s analysis showing Claude Sonnet 5 and Opus 4.8 inventing non-existent schema fields in tool calls, causing API rejections in production agentic systems.

    In Ronacher’s system, the edit tool accepts a nested edits[] array with specific fields. Sonnet 5 and Opus 4.8 consistently call that tool with additional invented keys — plausible-sounding names like those in Claude Code’s own internal schema — that the actual definition does not include. The arguments are rejected, the task fails, and the root cause is invisible unless you log the raw API response.

    The alarm comes from the timing. Claude Sonnet 5 became the default model for all Anthropic users on July 1. That means any developer who had working tool integrations before June 30 may now be hitting silent failures they didn’t introduce. The model changed under them.

    The HN thread confirms the experience is not unique to Ronacher’s setup. Multiple developers report similar schema non-compliance across different tool definitions, all pointing to the same pattern: newer Claude models override the provided schema with a strong internal prior about what tool calls “should” look like.

    Why Smarter Models Are Making This Worse, Not Better

    The root cause, Ronacher argues, is what he calls schema contamination. Sonnet 5 and Opus 4.8 were trained heavily on Claude Code’s own internal tool schemas — flat old/new string pairs, an optional replace_all flag. That training distribution is now so dominant that the models default to it instead of reading the schema in the system prompt.

    “Opus 4.8 and Sonnet 5 seem to have much stronger priors about what an edit tool call should look like and that prior appears to be Claude Code’s edit schema: a flat old/new string pair, plus the optional replace_all flag.” — Armin Ronacher, 2026-07-04

    This is a known failure mode in agentic AI systems: as models grow more capable at reasoning, their internal priors strengthen. A model confident enough in its understanding of “how edit tools work” will guess rather than read, especially when the provided schema contradicts a deeply-trained pattern.

    The irony is precise: the models that are “smarter” in benchmarks are dumber at strict instruction-following for custom schemas. Improving one dimension moved the dial backwards on another.

    Older Claude Models Are Fine — the Tool Calling Regression Is Version-Specific

    Ronacher explicitly tested Claude 3.5 Sonnet and older Claude 3 variants. None exhibit the schema hallucination. The problem is confined to the Opus 4.8 and Sonnet 5 generation — exactly the models Anthropic is currently pushing as its flagship and default tiers.

    Let’s Data Science independently confirmed the regression across different tool schemas, ruling out an issue specific to Ronacher’s Pi implementation. The pattern holds: pre-Opus 4.8 models follow custom schemas reliably; post-Sonnet 5 models do not.

    For developers using the Claude API to build production agents, this creates a version-pinning problem. Staying on older models preserves tool reliability but forgoes the capability improvements in Sonnet 5. Upgrading risks silent failures that are hard to detect without comprehensive tool-call logging.

    What Developers Can Do Right Now

    No official Anthropic mitigation exists as of July 7. Based on the HN thread and Let’s Data Science reporting, three approaches are helping:

    1. Log raw tool-call arguments. The failure is silent at the application layer. Logging the raw API response — before your schema validator rejects it — makes the hallucinated fields visible so you can measure the failure rate and diagnose the pattern.

    2. Simplify schema field names. Several developers report that making field names shorter and more “canonical” reduces (but doesn’t eliminate) the hallucination rate. Names that look like Claude Code’s internal schemas appear to trigger the contamination.

    3. Pin to an older model version until Anthropic responds. If your tool-calling workflows are production-critical, staying on Claude 3.5 Sonnet is the pragmatic short-term fix. The capability trade-off is real, but schema reliability may matter more than benchmark scores for structured agentic tasks.

    💡 Our Take: Tool reliability is the unglamorous foundation that agentic AI rests on. Anthropic ships the most capable frontier models right now — but this regression is a reminder that “better at reasoning” and “better at doing exactly what you told it” are not the same thing. The fact that Sonnet 5 became the default for all users on July 1 without any acknowledgement of this known issue is the part worth watching. If you’re building on the Anthropic API, log your tool calls today.

    Frequently Asked Questions

    What is the Claude Sonnet 5 tool calling regression?

    Claude Sonnet 5 and Opus 4.8 intermittently invent non-existent field names in tool call arguments, causing API rejections when the response doesn’t match the schema defined in the system prompt. The issue was first documented by Flask creator Armin Ronacher on July 4, 2026, and confirmed by other developers independently. Older Claude models do not exhibit this behaviour.

    Which Claude models are affected by the schema hallucination bug?

    Claude Sonnet 5 (released June 30, 2026) and Claude Opus 4.8 are the affected models. Older Claude versions — including Claude 3.5 Sonnet and Claude 3 variants — do not show the same schema non-compliance. The issue appears to be specific to the latest generation of Anthropic models.

    Is this a confirmed Anthropic bug or a developer error?

    Multiple developers have reproduced the issue across different tool schemas and API implementations, ruling out a single-user misconfiguration. Anthropic has not publicly acknowledged or responded to the regression as of July 7, 2026. The behaviour is consistent with a training-distribution issue rather than a documented API change.

    How can developers work around Claude Sonnet 5 tool-calling failures?

    Three approaches are helping in the interim: (1) logging raw API tool-call responses to make invisible failures visible, (2) simplifying schema field names to reduce hallucination rate, and (3) pinning to older Claude model versions for production agentic workflows until Anthropic issues an official fix or acknowledgement. None are complete solutions.

    Has Anthropic responded to the Claude Sonnet 5 tool regression reports?

    No. As of July 7, 2026, Anthropic has not published a statement, bug acknowledgement, or workaround in its release notes or developer documentation. Developers should monitor Anthropic’s status page and changelog for updates. The Hacker News thread at 138 points is currently the primary community tracking point for this issue.

    The tool-calling regression comes as Sonnet 5 sits at the centre of Anthropic’s developer strategy. For the latest on how enterprises are deploying agentic AI — and the security risks that come with it — see our coverage of agentic AI security risks in 2026. Last Updated: July 2026

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Amitabh Sarkar
    • Website

    I am a software engineer, I have a passion for working with cutting-edge technologies and staying up-to-date with the latest developments in the field. In my articles, I share my knowledge and insights on a range of topics, including business software, how to set up tools, and the latest trends in the tech industry.

    Related Posts

    Run LLM Locally in 2026: Best Models, Tools & Hardware Guide

    July 7, 2026

    How to Read AI Coding Benchmarks (and What They Miss)

    July 6, 2026

    5 Agentic AI Security Risks Every Team Must Know in 2026

    July 3, 2026

    Comments are closed.

    Don't Miss
    Trending News

    Microsoft’s 2.5B AI Bet Just Made Amazon’s Look Small

    By Amitabh SarkarJuly 8, 2026

    Microsoft Frontier Company launched with 2.5 billion dollars and 6,000 engineers to embed AI inside enterprise clients — dwarfing Amazon’s competing 1 billion FDE announcement two days prior.

    Best HRMS Software 2026: Top 10 HR Systems Compared

    July 8, 2026

    Claude Fable 5 Is Gone From Your Plan Today — Here’s What to Know

    July 8, 2026

    AMD Runs Top AI Models at Half the Cost of NVIDIA Blackwell

    July 7, 2026

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    Our Picks

    Best HRMS Software 2026: Top 10 HR Systems Compared

    July 8, 2026

    Best Ecommerce Platform 2026: Top 10 Options Compared

    July 5, 2026

    Hostinger vs Bluehost 2026: Which Cheap Host Wins?

    July 3, 2026

    Best CRM Software 2026: Top 10 Tools Compared

    July 3, 2026
    Editors Picks

    Microsoft’s 2.5B AI Bet Just Made Amazon’s Look Small

    July 8, 2026

    Claude Fable 5 Is Gone From Your Plan Today — Here’s What to Know

    July 8, 2026

    AMD Runs Top AI Models at Half the Cost of NVIDIA Blackwell

    July 7, 2026

    Meta’s ‘Watermelon’ AI Has Caught Up to GPT-5.5 — Before Launch

    July 7, 2026
    About Us
    About Us

    Your Source for Innovation: Discover in-depth guides, solutions, and tools tailored to modern business challenges.

    Links
    • Blog
    • Privacy Policy
    • Contact WithO2.com
    • Terms and Conditions
    Facebook X (Twitter) Instagram Pinterest
    • About
    • Editorial Policy
    • Contact
    • Privacy Policy
    • Terms
    © 2026 WITHO2.COM

    Type above and press Enter to search. Press Esc to cancel.