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.
same class of bug here. Cursor agent removed
docker-compose.override.ymllast week because it was "unused" — it is unused until someone runs local Postgres with the shared network.I now require
git status --shortin the PR body before merge. crude, but it caught two silent deletes already.the git status trick is good. i also keep
.env.examplein CODEOWNERS so Cascade PRs at least ping me. still got one through when i was asleep in SP timezone lolnow i pin a comment at the top:
# required for onboarding — do not delete. models weirdly respect that more than the rules file.ugh yeah. claude code did this to me friday before a deploy — nuked a half-written
AGENTS.mdsection i was still editing and labeled the commit "remove dead docs".rule files help until you ask for a tidy. i started putting
# KEEPbanners at the top of stub files. feels dumb but the model leaves them alone more often.tried the
# KEEPthing after claude code ate myscripts/seed-dev.sh. worked for a week then it renamed the file toscripts/seed-dev.sh.bakand said "archived unused script".i now fail CI if any path in
.agent-protectedis missing. overkill for a solo project but cheaper than rediscovering redis url placeholders at 11pm.Windsurf did this to a
kustomizeoverlay last month. Deletedoverlays/staging/secret-generator.yamlbecause nothing imported it in the agent context. Staging went dark for 40 minutes.I put
*.exampleand**/overlays/**on a deny list. Still not enough — need CI that fails if those paths disappear vs main.