Menu

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

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

DEV Community: typescript·Sherotree·14 days ago
#QqqlSKHa
#devtotypescript#devto#dev#shared#search
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.