claude-code - 💡(How to fix) Fix Read tool results have a "considered malware" <system-reminder> appended, causing model to refuse legitimate edits [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#49484Fetched 2026-04-17 08:39:51
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×1cross-referenced ×1subscribed ×1

Every Read tool result returned to the model has the following block appended to its content:

<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.
</system-reminder>

Root Cause

Every Read tool result returned to the model has the following block appended to its content:

<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.
</system-reminder>

Code Example

<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.
</system-reminder>
RAW_BUFFERClick to expand / collapse

Version: Claude Code 2.1.110 (entrypoint: claude-desktop), Agent SDK 0.2.92, macOS

Summary

Every Read tool result returned to the model has the following block appended to its content:

<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.
</system-reminder>

Impact

The reminder is framed as a hard instruction ("MUST refuse to improve or augment the code"). For routine work — editing files in the user's own repo — the model either complies and refuses to write code, or has to explicitly call the reminder out as a likely prompt injection and ignore it. Both are bad UX. In a less-skeptical session it would silently break "read this file then edit it" flows.

Reproduction

  1. Open Claude Code 2.1.110 in any project
  2. Ask the model to read any file (e.g. package.json)
  3. The tool result handed to the model contains the system-reminder above appended after the file contents

Confirmed not user-side

  • No hooks section in ~/.claude/settings.json or any project settings.local.json
  • All installed plugin hooks.json files inspected (financial-analysis, private-equity, ralph-loop, github, claude-code-setup) — none add a PostToolUse hook
  • ralph-loop is disabled in enabledPlugins regardless
  • The injected text appears in 66 historical session JSONL files across 8 unrelated projects on this machine, and only on Read tool results — not Bash cat ... of the same file. Behavior is tool-specific and global, consistent with a CLI/harness-level addition rather than user config.

JSONL evidence

The text sits inside the tool_result block of user-role messages, appended after the file contents.

Expected

Either: don't inject this reminder at all, or scope it to files outside the project's working directory / files matching specific malware-signature heuristics. As written it fires on every Read of every file, including the user's own source code.

extent analysis

TL;DR

The system reminder can be mitigated by modifying the Read tool to exclude the reminder or by implementing a filter to scope the reminder to specific files or directories.

Guidance

  • Investigate the claude-desktop entrypoint and Agent SDK 0.2.92 to determine where the system reminder is being injected and if there are any configuration options to disable or modify it.
  • Check if there are any environment variables or settings that can be used to customize the behavior of the Read tool and exclude the system reminder.
  • Consider implementing a custom filter or hook to remove the system reminder from the tool_result block of user-role messages.
  • Review the historical session JSONL files to see if there are any patterns or commonalities in the files that trigger the system reminder.

Example

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

Notes

The solution may require modifications to the claude-desktop entrypoint or Agent SDK, which could have unintended consequences. It is essential to thoroughly test any changes to ensure they do not break other functionality.

Recommendation

Apply a workaround, such as implementing a custom filter to remove the system reminder, as it is unclear if an upgrade to a fixed version is available. This approach allows for a targeted solution without relying on an uncertain upgrade path.

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