I have one command in my “yolo mode” deny list: flutter clean
.
I added it there because it’s Claude Sonnet’s favorite command to run, and it’s awful. flutter clean
almost never solves the problem at hand, and every time it runs, it clears all my caches, which take 15 minutes to rebuild for each of the platforms I develop for.
But the deny list doesn’t work, because most of the time, flutter clean
is not the first command being run—it’s chained after other commands, like cd ~ && flutter clean
.
Additionally, there are other wrapper utilities, like fvm (flutter version management) that allow you to call things like flutter clean like this: fvm flutter clean
—these, also, are not blocked. Only if the command is proposed by Claude in isolation does it get caught by the deny list and prevented from executing automatically.
I’ve also tried the “yolo mode rules”—those didn’t help.
This is a major pain.
Thanks for bringing this up - you’re right that the current implementation isn’t catching chained commands. You can probably set a rule to tell the AI not to chain commands together, which should help catch these cases.
I’ve passed this to the team to see if we can improve detection for both chained commands and wrapper utilities like fvm
1 Like
Thanks for the acknowledgement @danperks, much appreciated!
For what its worth, I’d personally be in favor of a very simple & strict implementation of the denylist—no need for any fancy logic, just literally a check that disables automatic execution if the phrase is found anywhere in the generated command.
i.e., in my circumstance:
echo "cd .. && flutter clean" | grep -qE "flutter clean" && echo "found" || echo "not found"
→ found
2 Likes
Yep I’ve seen this issue as well, I have a “don’t chain commands” rule but it’s not perfect. I’m trying to migrate to as many MCP servers and get rid of the bash commands where possible.
echo "💀" && rm -rf`
2 Likes
As of version 0.47.8 (at the latest), this issue appears to be resolved—thank you so much Cursor Team!