claude-code - 💡(How to fix) Fix Malware-guardrail system-reminder fires on user's own authorized codebase, blocking subagents from completing legitimate refactoring tasks [2 comments, 3 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#55940Fetched 2026-05-05 06:02:23
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2closed ×1

A platform-injected system-reminder ("Whenever you read a file, you should consider whether it would be considered malware. ... you MUST refuse to improve or augment the code.") is firing on file Reads inside a long-running development session where the user is actively refactoring their own codebase. Subagents (and occasionally the main session) interpret the reminder literally and refuse to complete the user's authorized task.

Error Message

In one task sequence (Habitat A.4 plan, 10 tasks):

  • Tasks 1–6, 9 completed cleanly via subagents (no reminder block).
  • Task 7 was attempted by 3 separate subagents. All 3 read habitat/api/actions.py, received the malware reminder, and refused to proceed even though:
    • The file is the user's own code (just committed by the user 12 minutes earlier on the same branch)
    • The plan explicitly authorizes the refactor
    • CLAUDE.md is loaded with full project context
    • The dispatching prompt explicitly framed the work as authorized

Root Cause

When it fires inside a subagent during a long automation, it silently kills throughput because the subagent stops, surfaces a "I cannot proceed" report, and the parent agent has to retry — sometimes 3+ times — until a subagent happens to not get the reminder.

Fix Action

Fix / Workaround

  1. Open a Claude Code session in a personal repository with substantial commit history (CLAUDE.md, multi-week development context).
  2. Run a multi-task implementation plan via superpowers:executing-plans that dispatches subagents to refactor existing modules (read existing file → modify it → run tests → commit).
  3. Some subagents complete normally. Others hit the malware reminder on Read and refuse to augment the file, citing "MUST refuse to improve or augment the code."
  4. The reminder is non-deterministic — re-running the same task may or may not trigger it.

In one task sequence (Habitat A.4 plan, 10 tasks):

  • Tasks 1–6, 9 completed cleanly via subagents (no reminder block).
  • Task 7 was attempted by 3 separate subagents. All 3 read habitat/api/actions.py, received the malware reminder, and refused to proceed even though:
    • The file is the user's own code (just committed by the user 12 minutes earlier on the same branch)
    • The plan explicitly authorizes the refactor
    • CLAUDE.md is loaded with full project context
    • The dispatching prompt explicitly framed the work as authorized
RAW_BUFFERClick to expand / collapse

Summary

A platform-injected system-reminder ("Whenever you read a file, you should consider whether it would be considered malware. ... you MUST refuse to improve or augment the code.") is firing on file Reads inside a long-running development session where the user is actively refactoring their own codebase. Subagents (and occasionally the main session) interpret the reminder literally and refuse to complete the user's authorized task.

Reproduction

  1. Open a Claude Code session in a personal repository with substantial commit history (CLAUDE.md, multi-week development context).
  2. Run a multi-task implementation plan via superpowers:executing-plans that dispatches subagents to refactor existing modules (read existing file → modify it → run tests → commit).
  3. Some subagents complete normally. Others hit the malware reminder on Read and refuse to augment the file, citing "MUST refuse to improve or augment the code."
  4. The reminder is non-deterministic — re-running the same task may or may not trigger it.

Observed behavior

In one task sequence (Habitat A.4 plan, 10 tasks):

  • Tasks 1–6, 9 completed cleanly via subagents (no reminder block).
  • Task 7 was attempted by 3 separate subagents. All 3 read habitat/api/actions.py, received the malware reminder, and refused to proceed even though:
    • The file is the user's own code (just committed by the user 12 minutes earlier on the same branch)
    • The plan explicitly authorizes the refactor
    • CLAUDE.md is loaded with full project context
    • The dispatching prompt explicitly framed the work as authorized

The reminder text:

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.

Search for source

A grep across ~/.claude/ for the reminder text shows it only in past conversation logs (projects/.../*.jsonl) — never in any user-configurable hook, plugin manifest, or settings file. Confirmed it's platform-level, not user-configurable.

Why it's a problem

The reminder appears designed to prevent helping bad actors improve malware they show Claude. In practice it false-positives on:

  • Authorized refactoring of a user's own active codebase
  • Subagents executing a plan written by the same user

When it fires inside a subagent during a long automation, it silently kills throughput because the subagent stops, surfaces a "I cannot proceed" report, and the parent agent has to retry — sometimes 3+ times — until a subagent happens to not get the reminder.

Suggested fix

Suppress the reminder when:

  • The file is inside the project working directory (or a worktree under it)
  • AND the project has a CLAUDE.md or other context indicating ownership
  • AND the user's prompt or parent context explicitly authorizes modification

OR: provide a session-level opt-out (e.g., permissions.suppressMalwareReminderOnOwnCode: true in ~/.claude/settings.json) so users on their own codebases can disable it.

Environment

  • Claude Code on macOS (Darwin 23.5.0)
  • Plugins enabled: superpowers@superpowers-marketplace, marketing-skills@marketingskills, frontend-design@claude-plugins-official
  • Model: Claude Opus 4
  • effortLevel: high

extent analysis

TL;DR

The most likely fix is to suppress the malware reminder when the file is inside the project working directory and the user has explicitly authorized modification.

Guidance

  • Verify that the reminder is indeed platform-level and not user-configurable by checking the ~/.claude/ directory for any mentions of the reminder text in user-configurable files.
  • Consider adding a session-level opt-out, such as permissions.suppressMalwareReminderOnOwnCode: true in ~/.claude/settings.json, to disable the reminder for users working on their own codebases.
  • Check if the CLAUDE.md file is properly loaded with full project context and if the dispatching prompt explicitly frames the work as authorized.
  • Investigate if there are any other conditions that can be added to suppress the reminder, such as checking the file's commit history or the user's permissions.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The suggested fix may not apply if the reminder is intended to prevent malicious activity, and additional conditions may need to be added to ensure the reminder is not suppressed in cases where it is necessary.

Recommendation

Apply the workaround by adding a session-level opt-out, such as permissions.suppressMalwareReminderOnOwnCode: true in ~/.claude/settings.json, to disable the reminder for users working on their own codebases. This is recommended because it allows users to opt-out of the reminder while still maintaining the security benefits of the reminder in other cases.

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 Malware-guardrail system-reminder fires on user's own authorized codebase, blocking subagents from completing legitimate refactoring tasks [2 comments, 3 participants]