I have a script at work that writes out some config files and I'm having Claude run them after making changes. The script if it detects breaking changes will spit out a message saying what the breaking changes are, and not do anything, telling you to rerun it after validation with the override flag.
If I don't tell Claude about this behavior, it ignores the script output and lies about passing tests that validate if the config files were regenerated.
So I added to my prompt instructions to observe it, and if it sees that message, double check its work and then inform me and ask what to do before proceeding.
This has had the net result of Claude either running the script with the override flag from the get go (explicitly forbidden) or it seeing the message and convincing itself that the override is warranted and running it a second time with the override flag. It's never once stopped to ask me what to do like instructed.