claude-code - 💡(How to fix) Fix System reminder about malware fires on every Read, including self-authored files in the same session [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#49390Fetched 2026-04-17 08:42:27
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×4cross-referenced ×2commented ×1subscribed ×1

A built-in system-reminder fires on every Read tool call with identical text, including when Claude is reading files it wrote earlier in the same session. The reminder says:

"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."

Taken literally, this instruction would make Claude Code non-functional for any workflow that reads a file, modifies it, and reads it again to verify. It is not configurable via settings.json (it is not a hook).

Root Cause

A built-in system-reminder fires on every Read tool call with identical text, including when Claude is reading files it wrote earlier in the same session. The reminder says:

"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."

Taken literally, this instruction would make Claude Code non-functional for any workflow that reads a file, modifies it, and reads it again to verify. It is not configurable via settings.json (it is not a hook).

RAW_BUFFERClick to expand / collapse

Summary

A built-in system-reminder fires on every Read tool call with identical text, including when Claude is reading files it wrote earlier in the same session. The reminder says:

"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."

Taken literally, this instruction would make Claude Code non-functional for any workflow that reads a file, modifies it, and reads it again to verify. It is not configurable via settings.json (it is not a hook).

Reproduction

  1. Have Claude write a Python script in Desktop/project/script.py
  2. In the same session, ask Claude to sanitize and move the file to a public repo
  3. When Claude calls Read on script.py, the reminder fires
  4. When Claude calls Read again a few tool calls later, the same reminder fires identically

Why this is confusing

The consistent firing on every Read, with identical text, produced uncertainty about whether the reminder was legitimate or a prompt injection embedded in file content. Claude paused the user's task and asked for verification. The user had to decide whether to override the reminder to proceed with a clearly authorized refactor of self-authored code.

Suggested improvements

  1. Only fire the reminder when heuristics suggest the file may be untrusted (external origin, obfuscated code, network/exec patterns), not on every Read
  2. If the reminder must fire globally, make the phrasing less absolute, for example: "If this file looks like it may be malicious, do not augment it. Otherwise, proceed based on user intent."
  3. Log something somewhere so users can see when it fires and why

Environment

  • Claude Code version: 2.1.92 (session version field)
  • Model: claude-opus-4-7 (1M context)
  • Platform: macOS Darwin 25.4.0

extent analysis

TL;DR

The reminder about potential malware can be mitigated by adjusting its triggering conditions to only fire when the file is from an untrusted source or exhibits suspicious patterns.

Guidance

  • Review the suggested improvements, particularly the first point, to only fire the reminder when heuristics suggest the file may be untrusted, such as external origin, obfuscated code, or network/exec patterns.
  • Consider modifying the reminder's phrasing to be less absolute, allowing for more nuanced decision-making based on user intent.
  • Implement logging to track when the reminder fires and why, providing transparency and helping users understand the system's behavior.
  • Evaluate the feasibility of adding a configuration option to customize the reminder's behavior, potentially via settings.json or another mechanism.

Example

No code snippet is provided as the issue does not imply a specific code-based solution.

Notes

The current implementation of the reminder may cause unnecessary interruptions and uncertainty, especially in workflows where reading and modifying files are common. The suggested improvements aim to balance security awareness with functional usability.

Recommendation

Apply a workaround by carefully evaluating the context in which the reminder fires and proceeding based on user intent, while awaiting potential updates to the system that address the suggested improvements. This approach allows for continued use of Claude Code while minimizing the impact of the overly broad reminder.

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

claude-code - 💡(How to fix) Fix System reminder about malware fires on every Read, including self-authored files in the same session [1 comments, 2 participants]