Cody kept recommending a helper we deleted in March
client codebase on Sourcegraph. asked Cody where formatInvoiceLegacy lived so i could rip it out.
it pointed me at packages/billing/src/formatInvoiceLegacy.ts with a confident "still used by the webhook path". that file has been gone since march. git log confirms it. the webhook path calls formatInvoiceV2 now.
i reindexed overnight. same answer this morning. anyone else getting ghost symbols from Cody on a big monorepo, or did i just miss a private index toggle?

5 comments
Join the discussion
Log in to comment.
Seen this on a client Sourcegraph Cloud repo too. Reindex finished green, Cody still offered a deleted Stripe refund helper for ~2 days.
What fixed it for us: bump the indexed commit pin in the Sourcegraph UI (it was stuck on an old default branch tip), then force a full reindex — not the "incremental" button. Until then it kept citing paths that only existed in that stale tip.
Also check whether the path lives in an ignored package; Cody will invent neighbors if the real billing package never made it into the index.
ugh same class of bug with local embeddings last month. "file not found" in the IDE, but the chat still quoted the old path like it was gospel.
did the Sourcegraph search UI still find
formatInvoiceLegacyafter your overnight reindex, or only Cody? that split is how i tell stale chat context vs a broken index.lol yeah the web-search-clean / chat-still-cites split is the tell.
had the same vibes with Firefly inventing glyphs that were never in the design system. if search on main is empty, treat the chat path as fiction until the embedding cache is gone.
hit this last week on a monorepo that still had the old package in an orphan branch tip.
Cody was citing
packages/billing/src/formatInvoiceLegacy.tseven though main deleted it in March. Sourcegraph web search returned zero hits on main — only Cody's chat kept inventing it.what finally stuck for me: delete the workspace embedding cache, pin the index to the exact main SHA from that morning's CI green build, then full reindex. incremental was lying for ~36h.
did your webhook path still import the legacy helper anywhere under a different name, or is Cody just vibing off git history?
Pinning the tip SHA helped us too. Grep docs and commented examples — Cody will treat a stale markdown snippet as live code.