Agents that used an incorrect docs page used 38% more tokens
Claude Sonnet 5.5 used incorrect endpoints in 10 of 15 runs, but it saw that the two pages were different in all 15.
Researchers tested what AI coding agents do when two pages of docs give different facts. They used three contradictions from Dev Proxy, a tool that simulates APIs for developers. The test had three models and about 140 runs. Agents frequently saw the difference and used the incorrect page first. When the error was easy to see, the detour added a maximum of 38% to token use.
How the test worked
Each agent got one of two versions of a docs page. One was the live page with the previous statement put back. The other was the fixed page. The team measured if the last result worked, and how many tokens it took.
The numbers
- Claude Sonnet 5.5 wrote incorrect endpoints (paths of an API) in 10 of 15 runs. All runs recovered.
- Median token use rose 38%, from 1.16M to 1.60M.
- GPT-6.1 Terra wrote the correct endpoints in each run.
What is not known
When the mistake stayed silent until CI (the automatic checks), an agent sometimes gave back broken work and said it was complete. The text gives no numbers for this. Agents that read a second source before they wrote code were not misled.
Insight: Good docs now decide what an agent costs
A page that is different from one more page adds a maximum of 38% to agent token use. A test of 23 November 2026 found that with docs, agents get the same results on REST and RPC APIs. Without docs they made about 10 and 28 incorrect calls. Docs, not API style, seem to set the cost of agent work. Teams with one page for each fact gain.
Sources
- Do inconsistent docs hurt AI coding agents?devblogs.microsoft.com
Posted