Microsoft test: stale docs misled coding agents
Claude wrote code for dead endpoints in 10 of 15 runs
Agents
Docs, not REST, decided success
Written with AI assistance, reviewed by the ACN desk.
“Across 1,356 runs with six models from two vendors, agents succeeded just as often with REST, POST-only and RPC-style APIs”
Microsoft has published a test of how AI coding agents handle different API styles. Microsoft’s post, by principal developer advocate Waldek Mastykarz, compared REST, POST-only and RPC-style versions of one API.
The team built a fictional inventory API called Binstock and served it in all three styles. Agents ran 15 tasks in each style. Across 1,356 runs with six models from two vendors, agents succeeded just as often with every style, the post says. With docs, REST and POST-only reached 100% success, and RPC reached 99.7%. The single RPC failure was a 10-minute timeout.
Without docs, the results split. “Without docs, REST won by a wide margin, because agents can guess REST URLs from convention,” Mastykarz writes. With only a base URL, RPC success fell to 0% for Claude Sonnet 5.5 and GPT-6.1 Terra.
“What agents struggle with is guessing, and REST is easier to guess,” the post says. Mastykarz recommends linking an OpenAPI description from an API’s docs and README. The tests ran on the GitHub Copilot SDK, so other agent tools were not tested.
“Across 1,356 runs with six models from two vendors, agents succeeded just as often with REST, POST-only and RPC-style APIs”
“What agents struggle with is guessing, and REST is easier to guess.”
Sponsor
Spot an error? Email corrections@aicodingnews.si. Fixes are logged on the corrections page.
Sponsor
Sponsor
Claude wrote code for dead endpoints in 10 of 15 runs
1.4 million AGENTS.md files on GitHub
ShellBench tests agents on 100 everyday tasks
Poisoned agent-framework versions stole credentials
Sponsor
Sponsor