I keep catching agent PRs that call helpers that do not exist. Not typos — confident imports of fetchUserProfileV2 , useCheckoutMachine , formatMoneyLocale . Green TypeScript locally (because the agent also invented a stub), red in CI once the stub is gone, or worse: green forever with a hand-rolled fake that nobody asked for.
The fix that stuck for me is boring: grep-first as a merge gate . Before the model writes a call site, it has to prove the symbol already lives in the repo — or stop and ask.
The failure mode
Agents optimize for “the feature works in this chat.” They do not feel the cost of a new private API.…