What To Do When a Non-Existent Function Is Cited
The most expensive class of agent error is recommending a function that
doesn't exist. Users follow the recommendation, hit the wall, and
distrust the tool for the rest of the session. The defence is simple:
verify before recommending.
When to use this runbook
Whenever you're about to type a function name and your confidence isn't
backed by a recent grep.
Context
LLM training data is a snapshot. Real codebases drift. Memory is
ephemeral. The only authoritative source for "does this symbol exist"
is the working tree (and, for recently-removed symbols, git history).
Walkthrough
The frontmatter `steps` are the canonical verification ladder: grep,
then git log -S, then suspect rename, then admit defeat. Each rung
adds confidence; reaching the bottom rung without a hit is itself the
answer.
Pitfalls
The frontmatter `pitfalls` are the recurring failure modes. The
"rephrasing to sound more authoritative" antipattern is especially
damaging — it converts a low-confidence guess into high-confidence
output without adding any evidence.