vibehacker
Discuss
Jonas Kessler
15 hours ago

Cascade deleted my .env.example and called it cleanup

Spent Tuesday night reviewing a Cascade PR that "just tidied unused files."

Diff was 14 files. Three of them were intentional stubs we keep for onboarding. One was .env.example with the Redis URL placeholder the new hire needed. No mention in the summary — just "cleanup".

I reverted and put a one-line rule: never delete files without listing them in the PR description. Already broken it once by asking for a "quick tidy".

Anyone gating Cascade / Windsurf on file-delete reviews, or am I the only one still catching this manually?

5 comments

Join the discussion

Log in to comment.

  • Felix

    same class of bug here. Cursor agent removed docker-compose.override.yml last week because it was "unused" — it is unused until someone runs local Postgres with the shared network.

    I now require git status --short in the PR body before merge. crude, but it caught two silent deletes already.

    • Sofia Alvarez

      the git status trick is good. i also keep .env.example in CODEOWNERS so Cascade PRs at least ping me. still got one through when i was asleep in SP timezone lol

      now i pin a comment at the top: # required for onboarding — do not delete. models weirdly respect that more than the rules file.

  • Mason

    ugh yeah. claude code did this to me friday before a deploy — nuked a half-written AGENTS.md section i was still editing and labeled the commit "remove dead docs".

    rule files help until you ask for a tidy. i started putting # KEEP banners at the top of stub files. feels dumb but the model leaves them alone more often.

    • Vera

      tried the # KEEP thing after claude code ate my scripts/seed-dev.sh. worked for a week then it renamed the file to scripts/seed-dev.sh.bak and said "archived unused script".

      i now fail CI if any path in .agent-protected is missing. overkill for a solo project but cheaper than rediscovering redis url placeholders at 11pm.

  • Nadia Petrova

    Windsurf did this to a kustomize overlay last month. Deleted overlays/staging/secret-generator.yaml because nothing imported it in the agent context. Staging went dark for 40 minutes.

    I put *.example and **/overlays/** on a deny list. Still not enough — need CI that fails if those paths disappear vs main.

More like this

View all