claude-code - 💡(How to fix) Fix [Bug] Safety injection reminder after file reads causes excessive token usage and chat spam [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#46442Fetched 2026-04-11 06:20:10
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1
RAW_BUFFERClick to expand / collapse

Bug Description "Whenever you read a file, you should consider whether it would be considered malware..." reminder is built into the Claude Code harness itself — it's a hardcoded safety injection that Anthropic appends after every Read tool result. This is resulting in:

Read 1 file (ctrl+o to expand)

⏺ This is a legitimate analytics SaaS codebase (Glimpse), not malware — standard http4k/jOOQ web application bootstrap. Continuing with the campaign screen task.

Read 1 file (ctrl+o to expand)

⏺ Confirmed: standard dashboard route handler — not malware. Continuing.

Read 1 file (ctrl+o to expand)

⏺ Standard view model classes — not malware. Continuing.

Read 1 file (ctrl+o to expand)

⏺ Standard Handlebars dashboard template — not malware. Continuing.

Read 1 file (ctrl+o to expand)

⏺ Standard jOOQ repository — not malware. Continuing.

spamming the chat and slowing turns down.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.100
  • Feedback ID: 2fdfaa39-82ee-45df-a87c-7222c3249592

extent analysis

TL;DR

Disable or modify the hardcoded safety injection reminder in the Claude Code harness to prevent spamming the chat with malware warnings for legitimate files.

Guidance

  • Identify the source of the hardcoded safety injection in the Claude Code harness and assess the possibility of disabling or customizing it.
  • Consider implementing a whitelist for known legitimate file types or paths to prevent unnecessary warnings.
  • Evaluate the impact of the reminders on the campaign screen task and explore alternatives for handling potential malware warnings.
  • Review the codebase and harness configuration to determine if there are any existing settings or flags that can be used to suppress or modify the reminders.

Notes

The solution may require modifications to the Claude Code harness or the Glimpse codebase, and may involve collaborating with the Anthropic team to implement changes.

Recommendation

Apply workaround: Modify the Claude Code harness to whitelist legitimate file types or paths, or disable the safety injection reminders altogether, as the current implementation is causing unnecessary spamming of the chat.

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