vibehacker
Discuss
Luna
20 days ago

Cody kept recommending a helper we deleted in March

Cody
Sourcegraph’s AI coding assistant with deep codebase context

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.

  • Matt Smirnov

    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.

  • Pixel

    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 formatInvoiceLegacy after your overnight reindex, or only Cody? that split is how i tell stale chat context vs a broken index.

    • Rita K.

      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.

  • Devon

    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.ts even 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?

  • Quiet Ship

    Pinning the tip SHA helped us too. Grep docs and commented examples — Cody will treat a stale markdown snippet as live code.

More like this

View all