When Code Becomes an LLM Call: An Empirical Study of Call-Site Contracts in Agentic Systems
Every place your code calls a model is a boundary with an unwritten agreement: what must hold before the call, what the request has to say, and which replies you accept before something acts on one. The authors wrote down the agreement each of 496 call sites in 40 open-source agent systems needs — deriving it from the job, without reading the code — then compared it against what the code enforces: 82% of call sites do check something before and after the call, yet only 5.3% cover their whole agreement, and two thirds of the constraints belonging in the request are left as instructions to the model rather than verified in code. Placement is what bites, because 48% of model outputs feed control flow or execution and 73% of those never reach a person. Ten recurring shapes explain 99% of the gaps, which makes them a review checklist worth running over your own call sites; start with the reply that fails open, where an invalid answer silently becomes the permissive default.