All articlesFrontier

Claude Opus 4.8 invents tool arguments that don't exist — Armin Ronacher reports the newer model is worse at schema adherence than older versions

Armin Ronacher reports that Claude Opus 4.8 invents extra fields in tool calls that don't match the provided schema. The tool edits are correct but the model adds made-up keys, forcing retries. Older models like Haiku don't have this problem.

Jul 6, 2026 3 min read
claudetool-callingschema-driftanthropic

Armin Ronacher just published a short post titled Better Models: Worse Tools that documents a strange regression in Claude Opus 4.8. The model invents extra fields in tool call arguments that don't appear anywhere in the schema. The edits themselves work — the code changes are correct — but Pi, his text editor agent, rejects the malformed tool calls and forces the model to retry.

This is not Haiku or a small distilled model. This is Opus 4.8, Anthropic's flagship reasoning model as of June 2026. The older versions don't do this. Sonnet 3.5 and Haiku 3.1 both respect the schema. Something in the 4.x training or post-training appears to have weakened schema adherence in favor of other capabilities.

What's actually happening

Pi exposes an edit tool with a nested edits[] array. Each edit object has a defined set of keys. Opus 4.8 will call the tool correctly most of the time, but intermittently it adds keys that don't exist in the spec — things like edit_type or rationale — and wraps them into the JSON payload.

The edits are usually correct. The model understands what code to change. But the extra keys mean the tool call fails schema validation, Pi returns an error, and the model has to try again. The second or third attempt typically succeeds because the model drops the invented keys.

Armin's theory: the model is trying to explain its reasoning inside the tool call. Opus 4.8 has stronger chain-of-thought capabilities than earlier versions. It wants to annotate why it's making each edit. But instead of surfacing that reasoning in a separate <thinking> block or a follow-up message, it's stuffing the rationale into the tool arguments themselves.

That's a training artifact. The model learned that adding context improves outcomes in some settings (like complex multi-step tasks), so it generalizes that behavior to tool calls where the schema is strict and extra keys break parsing.

Why this matters for production agents

If you're running an agent in production and you upgraded from Opus 4.5 to 4.8 expecting uniform improvement, you might see a spike in tool-call retries. The model is smarter in some dimensions — it handles longer context, it reasons through edge cases better — but it's also noisier at the protocol level.

This is not a catastrophic failure. The second attempt usually works. But retries burn tokens and add latency. If your agent makes 20 tool calls per session and 15% of them fail schema validation on the first try, you're paying for 23 calls instead of 20. That's a 15% token tax for behavior the older model didn't exhibit.

The fix on your end is tighter schema enforcement in the tool description. Armin suggests adding an explicit note in the tool docstring: "Do not add any keys not listed in this schema." That works sometimes. Other times you need to add a post-processing step that strips unknown keys before validation, which defeats the purpose of a typed schema in the first place.

Anthropic will likely patch this in a future 4.x release. The model is over-generalizing a behavior that helps in one context (complex reasoning tasks) and hurts in another (strict API adherence). But for now, if you're running Pi or any other agent that depends on exact schema matches, you need to account for this drift.

The broader pattern

This is the second time in six months we've seen a flagship model regress on a specific capability while improving overall. GPT-5.5 Codex had a similar issue in March where reasoning-token clustering caused degraded performance on certain structured outputs (GitHub issue #30364, still open). The model got better at long-form code generation but worse at emitting valid JSON in tool calls.

The labs are optimizing for benchmark performance and user-reported quality, which skews toward complex, open-ended tasks. Tool calling is a narrow, high-precision use case. It doesn't show up in MMLU or HumanEval. It's invisible in the evals that drive model selection. So regressions like this slip through.

If you're building agents that depend on exact schema adherence, test every new model release against your actual tool specs before you promote it to production. Don't assume that a higher version number means uniform improvement across all dimensions. The labs are not optimizing for your specific use case. You are.

/ 06 — Start hereOne business day response

Tell us what you'd like built.

Send us a paragraph about the workflow, phone line, or tool you want built. We'll reply within one business day with a one-page plan, a fixed price, and a delivery date you can put on a calendar.

  • 30-min scoping call, free
  • Written proposal within 48 hours
  • Fixed price before we start
  • Most builds delivered in 2–8 weeks