[BUG] MacOS kills Claude and says "Malicious Script Blocked"

Status Open
Reported on v2.1.246
Maintainer reply None cached
Activity 6 comments · opened Sep 2, 2026

Preflight Checklist

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

What's Wrong?

This happened twice last week (also on Wednesday) and again just now.

I was using Claude for something innocuous, and suddenly, the process was killed and I received this alert in a separate dialog box:

<img width="372" height="346" alt="Image" src="https://github.com/user-attachments/assets/5edf38cd-16f3-4db7-bd76-105cfc3eef52" />

The dialog says

Malicious Script Blocked A script was blocked because it contains malware. The script did not harm your Mac. [Done]

All the occurrences so far seemed to happen in completely bland circumstances.

  1. I was preparing to write some code, but Claude was firmly in the stage of examining the documentation and other files it was going to be working on in order to formulate a plan.
  2. I was working on a pull request and had Claude read feedback from a reviewer and responding to it with code changes and comments.
  3. I was collecting some statistics on domain names and running whois queries etc

When this happened last week, I was roughly on Claude 2.1.246, probably slightly earlier. The occurrence today happened on 2.1.252 and I have since updated to 2.1.258.

There is no repeatable repro that I can find; it seems to happen basically at random. In the last week, I have run dozens of sessions that were unaffected, often several in parallel.

What Should Happen?

MacOS should not kill Claude. It doesn't seem to kill random processes in general, so there is something specific that Claude is doing which triggers this. The best diagnostic I could get out of Claude itself was "maybe it reacted to something in a Python script in a here document?"

Error Messages/Logs

Process killed

Steps to Reproduce

  1. Use Claude as usual
  2. Randomly and rarely have Claude get killed from underneath

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.240 or thereabouts

Claude Code Version

2.1.252

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

4 Comments

fsc-eriker · 1 month ago

Adding a noise comment to prevent this from being closed.

ismailcelik-tr · 1 month ago

adding one more comment, i have the same issue with same version.

fsc-eriker · 1 month ago

@ismailcelik-tr Please upvote the ticket instead, that is apparently the better way to draw attention to it.

fmarrero · 1 month ago

Happening to me

Showing cached comments. Read the full discussion on GitHub ↗