When agents invent APIs — make grep-first a merge gate

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
Headline and summary provided via NewsData.io. The full article and its copyright belong to the original publisher.

