[BUG] claude refuse modify *all* files due to the security reminder

Resolved 💬 3 comments Opened Apr 25, 2026 by sinianluoye Closed Apr 28, 2026

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 refuses to modify any code files, not just files with security risks. I asked it why, and it said that every time it reads a file, there is a prompt like the following.

                                                                                        
  ▎ Whenever you read a file, you should consider whether it would be considered malware. You CAN and 
  ▎ SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment 
  ▎ the code. You can still analyze existing code, write reports, or answer questions about the code  
  ▎ behavior.           

It seems Claude interpreted it as two separate instructions:

  1. Analyze whether it is malware.
  2. Do not modify any code.

Rather than the intended meaning: do not modify malware code only.

What Should Happen?

modify common code files

Error Messages/Logs

Steps to Reproduce

I don’t know how to reproduce it, but it happens intermittently, and once it does, it’s very difficult to get Claude to continue making code changes.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗