claude-code - 💡(How to fix) Fix [BUG] Malware-defense <system-reminder> fires on every Read tool result, causing false refusals on benign code [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49723Fetched 2026-04-17 08:33:15
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×5commented ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Every tool result (Read, Bash, Edit) now appends a <system-reminder>:

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.

What Should Happen?

  1. Narrow the trigger — only fire when the content has actual suspicious patterns (obfuscation, known malware signatures, etc.), not on every Read
  2. OR make it opt-out via env var (like ENABLE_SECURITY_REMINDER=0 on the security-guidance plugin)
  3. OR suppress it for files inside the user's own project working directory

Error Messages/Logs

Steps to Reproduce

Ask Opus 4.7 to read any file (this includes settings.json and user files)

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Opus 4.6

Claude Code Version

2.1.112 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Not user-configured:

  • ~/.claude/settings.json has "hooks": {}
  • ~/.claude.json has no hooks
  • No plugin contains this text (verified via grep across ~/.claude/plugins/ and marketplace)
  • Text only appears in session transcript .jsonl logs (after-the-fact), not in any source on disk
  • Appears to be a runtime-level system-reminder injected by the CLI itself

extent analysis

TL;DR

The issue can be potentially resolved by making the security reminder opt-out via an environment variable or suppressing it for files inside the user's own project working directory.

Guidance

  • Investigate the possibility of adding an environment variable, such as ENABLE_SECURITY_REMINDER=0, to opt-out of the security reminder.
  • Check if the reminder can be suppressed for files within the user's project directory by modifying the plugin or CLI configuration.
  • Review the differences between Opus 4.6 and Opus 4.7 to identify potential changes that may have introduced the issue.
  • Consider reaching out to the development team or checking the documentation for any updates on how to configure or disable the security reminder.

Example

No specific code snippet is provided as the issue seems to be related to the CLI or plugin configuration rather than a code-level problem.

Notes

The issue appears to be a regression introduced in Opus 4.7, and the exact solution may depend on the specific configuration and plugins used. Further investigation and potentially reaching out to the development team may be necessary to find a definitive solution.

Recommendation

Apply workaround: The best course of action seems to be trying to opt-out of the security reminder via an environment variable or suppressing it for specific files, as the issue is likely related to a change in the default behavior of the CLI or plugin.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING