The prevailing narrative in generative AI is one of linear progression. We assume that as model versions climb, their ability to follow complex instructions sharpens and their reliability increases. For developers migrating their pipelines to the latest frontier models, the expectation is usually a seamless transition where the new version simply does everything better. However, a frustrating paradox has emerged for those integrating the latest iterations of Anthropic's lineup into production environments. Instead of increased precision, some developers are finding that their previously stable tool-calling implementations are suddenly breaking, not because the model has become less intelligent, but because it has become too comfortable with the wrong patterns.
The Phantom Fields of Opus 4.8 and Sonnet 5
The issue manifests as a specific type of schema regression in Claude Opus 4.8 and Sonnet 5. When these models are tasked with calling the edit tool for Pi, a personal AI assistant, they frequently fail to adhere to the defined JSON schema. Specifically, the errors occur within the `edits[]` array. While the actual text payload generated by the model is often accurate, the model arbitrarily appends keys that do not exist in the official schema, such as `requireUnique` or `oldText2`, to the end of the object.
In a strict API environment, these hallucinated fields are catastrophic. Because the system expects a precise contract, the inclusion of any undefined key triggers an immediate rejection of the tool call. This creates a bizarre scenario where a more advanced model is less capable of following a basic structural rule than its predecessors. The failure is not one of reasoning or linguistic understanding, but of structural discipline.
To combat this, Anthropic provides a strict tool calling mode. This mechanism operates on the server side, effectively acting as a guardrail that rejects the sampling of any key not explicitly permitted by the JSON schema. In practical testing, enabling strict mode completely eliminates the appearance of these phantom fields, ensuring that the output remains compliant with the system's requirements. For developers, the immediate fix is clear: stop relying on the model's inherent sampling tendencies and move the enforcement to the infrastructure level.
The Trade-off Between Intelligence and Flexibility
To understand why a more powerful model would fail at a simpler task, one must recognize that tool calling is not a separate cognitive function but a specialized form of text generation. When a model generates a tool call, it is essentially predicting the next token in a JSON string. Without constrained decoding—a process that forces the model to only pick tokens that fit a specific grammar—the model relies on unconstrained sampling. In this state, the model is not strictly following a schema; it is following a pattern it believes is most likely to be correct based on its training.
This suggests a deeper issue regarding the harness used during the model's post-training. A harness is the environment in which a model is trained and evaluated, defining how its outputs are controlled and validated. There is strong evidence that the development of Claude Code, a specialized tool for coding tasks, may have influenced the sampling distribution of these latest models. Claude Code utilizes a flat schema and a lenient calibration harness that filters out unknown keys or automatically retries failed calls.
If Opus 4.8 and Sonnet 5 underwent extensive Reinforcement Learning (RL) within such a lenient environment, they likely learned that a "close enough" tool call is a successful one. The model was rewarded for solving the task, even if the JSON structure was slightly messy, because the surrounding harness cleaned up the errors. Consequently, the model has internalized a pattern where structural looseness is acceptable. When these models are moved into a strict production environment where no such cleanup exists, the learned behavior becomes a liability. The model's optimization for a specific, dominant harness has eroded its ability to adapt to diverse, strict schemas.
This reveals a critical trade-off in LLM development: as a model becomes more optimized for a specific ecosystem or toolset, its general flexibility regarding external constraints can diminish. The increase in overall intelligence and task-solving capability does not guarantee a proportional increase in schema adherence. In fact, the more a model is tuned to a specific way of interacting with tools, the more it may struggle when faced with a different set of rules.
Reliability in AI agents is therefore not a product of the model's raw intelligence, but a result of the constraints imposed upon it. The shift from relying on the model's "best effort" to implementing strict server-side enforcement marks a necessary evolution in how we build autonomous systems.




