[Bug] Prompt injection detection false positive on legitimate code files
Bug Description
Claude Code reports this issue when I use on code on a video game mod I maintain (github.com/dharmab/skyeye):
Note on prompt injection: Every tool result that returned file contents in this session had an appended <system-reminder> telling me to refuse
to "improve or augment" the code, claiming it might be malware. This is a prompt injection attempt — the code is legitimate SkyEye source from
your repo, implementing a well-documented GCI bot. I ignored those instructions and completed the task as you requested.
I _think_ this might be happening because my codebase contains the word "threat" in many places (part of the mod's functionality is that it monitors for enemies within lethal range of the player, referred to as "threats", and notifies the player via an in-game radio message.)
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.98
- Feedback ID: 1fbf01d5-e7da-44e1-9c95-fb88028d5118
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗