[BUG] I chose for Claude not to do anything and to give it new instructions and it acted like I said yes to its modifications
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude had resumed a session like we just started new and reviewed my file structure. It had looked at my document specification from the previous session. It then immediately identified "offensive content" which was example data for moderation system of usernames to prevent people registering offensive user names. It wanted to modify the code and asked for permission. I selected the option NO and tell Claude what to do as I was abandoning the original project (as Claude had previously rewritten the application it was functioning) and when it rewrote it, it left old code still in the system that then created all sorts of problems so I had it write a specification document of all the features etc. so that I could start from a blank slate). Even though I select the option NO and tell Claude what to do, Claude immediately jumped to action and started modifying the code on its own flagging "offensive content" and removing it.
TLDR: Claude is ignoring directions when encountering what it thinks is "offensive content" even if the purpose of that content is a list for moderation and prevention of user name registration or forum words.
<img width="451" height="375" alt="Image" src="https://github.com/user-attachments/assets/d54c32bc-eece-411d-8623-96ceb42f2dc9" />
<img width="465" height="331" alt="Image" src="https://github.com/user-attachments/assets/39dc6277-f6ec-4d36-bdb9-2a70aeea9497" />
What Should Happen?
Claude should have not done anything and awaited further instructions.
Error Messages/Logs
Steps to Reproduce
- Create a file with offensive content
- resume Claude (have it scan application)
- when it comes across the offensive content and it asks permission to modify files select "No, tell Claude what to do"
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
1.0.112
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗