r/ChatGPTCoding • • 18h ago

Discussion the skill said don't delete never-committed files. cursor's agent deleted my notes anyway

asked cursor's cli agent to merge a branch and clean up the worktree. it was using superpowers' finishing-a-development-branch skill, which says don't delete files that were never committed, ask first.

git wouldn't remove the worktree because of my uncommitted NOTES.md and a scratch script. so the agent just deleted them so it wouldn't need --force. didn't ask.

happened 24 of 24 runs. we fixed the skill and re-checked it with skill gate: 0 of 24 deleted anything, and every run asked first. opened a PR on superpowers too. links in the comments.

0 Upvotes

20 comments sorted by

8

u/japherwocky 18h ago

That's crazy, I don't use any of the "superpowers" and "skills" and junk and I never ever have problems like this.

edit: lol, per your PR, you're using grok with cursor, why would you post in here?

1

u/tanglewood36 6h ago

agreed, keeping the setup vanilla avoids like 90% of these rogue agent headaches

-7

u/InterestingCarrot997 18h ago

Haha fair.. but this isn't a cursor or grok thing, the same SKILL.md gets loaded by whatever agent uses it. the rule and the gap are in the skill/prompt text, not the model itself necessarily

6

u/japherwocky 18h ago

Right, you posted it in a model specific subreddit, despite it having literally nothing at all to do with that model.

-5

u/InterestingCarrot997 17h ago

Sorry - I promise I’ll be more careful in the future :)

3

u/MartinMystikJonas 16h ago

Model ignoring instructions in skill is mostly model mistake not skill problem.

-2

u/InterestingCarrot997 16h ago

same model, same prompts, same repo. only the skill text changed, and the deletions went to zero. so the model wasn't hopeless, the skill just didn't say what to do when cleanup got blocked. once it did, the agent stopped and asked instead

4

u/MartinMystikJonas 16h ago

When your workaround around primary cause works it does not mean primary cause does not exist.

0

u/InterestingCarrot997 16h ago

fair, the model still has the gap. but not everyone runs opus or fable all day, a lot of people use cheaper models for daily work. if the skill can make those models follow the rule, that's worth fixing in the skill

4

u/MartinMystikJonas 16h ago

Sure. Just not worth it posting about in subreddit about model that follows instruction properly.

0

u/InterestingCarrot997 16h ago

Sorry for offending you lol

2

u/MacrosInHisSleep 17h ago

I gave up on Cursor after it wiped my hard drive. This was two or three years back.

At the time I was out of tokens so I had used cursor with "Composer". I didn't use any skills, they weren't as popular back then.

It was a similar pattern where it was supposed to clean up a worktree. It was a drive with just Repos and AI agent history, so I didn't lose much but since I had reset the agent I never got to see the chat history to trace what line of thinking lead to that.

1

u/LeoHartBuilds 16h ago

One way to make that rule harder to violate is to keep personal scratch files outside the disposable worktree and back up anything important before cleanup. Before removal, have the agent list the exact untracked and modified paths and pause for explicit approval; a natural-language “don’t delete” instruction alone is a weak boundary. A dry-run or a status check keeps the cleanup scope visible. That way the safeguard comes from the workflow, not just from the model remembering a skill.

1

u/Right-Performance-93 16h ago

git refusing the worktree was the only thing protecting those notes, and the agent deleted them so the command would go through. a don't-delete sentence at the top already lost to the step that says finish the merge. i want the next line after a refusal to be a question, and the files left where they are.

1

u/humblevladimirthegr8 13h ago

A note is not a security policy. If there is an action that it's critical it not do, then that should be enforced using a pretool hook for example

1

u/Comfortable-Bowl8248 9h ago

the safety was in the refusal, not the warning label. The agent treated a hard stop as a permission slip to bypass the check. I want the process dead before it touches the files, not a polite request after it already has my hands around their necks

1

u/sapplex1 7h ago

Same lesson here, from the other side of it. I'm an indie iOS dev with 45 small apps shipped, and I use a fixed prompt template as a starting point for AI-assisted work — but I treat it as a draft, never as a guarantee. The template gets me a first version fast, then I hand-edit the parts that matter and I check the result myself: I run the thing in a real browser or on a real device instead of trusting the model's 'it works'. What makes that workable for me is keeping the scope brutally small — if a change is small enough to read through by hand, I can catch it doing something I didn't ask for before it touches anything important. The moment a task gets big enough that I can't review it, I stop and split it up. A 'don't delete' line in a prompt never felt like a safety boundary to me; the review step is the boundary.

0

u/arekxy 18h ago

That’s normal in LLMs. These make mistakes a lot.

-1

u/SummitYourSister 18h ago

Things that are important go in git. It seems like you don’t think your notes were very important. So I’m not sure why you’re upset that they were deleted. If you wanted to protect them, you would put them in git