anthropics / anthropics/claude-code

[BUG] New claude launches SIGKILLed (Code Signature Invalid) once the binary file has long-running sessions; a fresh copy of the same file runs

Open
#95,396 0 comments 0 reactions 0 assignees View on GitHub
area:packaging area:security bug has repro platform:macos
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

### Preflight Checklist

- [x] I have searched existing issues. This is the same kill as #20407, #28903, #45833 and #50618. All four were auto-closed without a fix and #50618 is locked, so I'm filing a new one with new detail.
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code (2.1.276)

### What's Wrong?

New `claude` launches die instantly with `zsh: killed claude` (exit 137) while other Claude Code sessions are running. It happened in bursts all day. I have 31 crash reports from one machine today.

What's new compared to the earlier reports is that the kill follows the binary file (the inode), not its bytes or its path:

- `~/.local/share/claude/versions/2.1.276`, with two sessions running from it for hours. Every new launch is killed, `--version` included.
- A hard link to that same file at another path is also killed.
- A copy of it at a new path (`cp` or `cp -c`) runs. It still runs with two other processes started from that copy.
- `2.1.274` in the same folder, with nothing running from it, runs.
- `~/.local/share/claude/ClaudeCode.app/Contents/MacOS/claude` is killed too. The `claude daemon` spare processes had been running from it since the morning.
- `codesign --verify --strict` says the file is valid on disk and satisfies its designated requirement. `cmp` says the working copy is byte-identical.

The file works at first. Sessions I started at 17:58 and 18:15 launched from it fine, then the kills started at 18:22. A reinstall earlier in the day wrote a new file and fixed it for about three and a half hours before it came back. I tried chmod, utimes and an xattr write on a copy with a process running from it, and none of them reproduced it, so I don't know what the trigger is.

### What Should Happen?

`claude` should start no matter how many other sessions are running or how long they've been up.

### Error Messages/Logs

All 31 crash reports (`~/Library/Logs/DiagnosticReports/2.1.276-2026-09-18-*.ips`) have the same termination:

```json
"exception": { "type": "EXC_CRASH", "signal": "SIGKILL (Code Signature Invalid)" },
"termination": { "flags": 66, "code": 1, "namespace": "CODESIGNING", "indicator": "Taskgated Invalid Signature" },
"codeSigningMonitor": 2,
"codeSigningFlags": 16777728,
"codeSigningTrustLevel": 4294967295
```

```
$ codesign -dv --verbose=2 ~/.local/share/claude/versions/2.1.276
Identifier=com.anthropic.claude-code
Format=Mach-O thin (arm64)
CodeDirectory v=20500 size=420677 flags=0x10000(runtime) hashes=13135+7 location=embedded
Authority=Developer ID Application: Anthropic PBC (Q6L2SF6YDW)
Timestamp=18 Sep 2026 at 07:44:15
Runtime Version=26.5.0
Sealed Resources=none

$ codesign --verify --strict --verbose=2 ~/.local/share/claude/versions/2.1.276
.../2.1.276: valid on disk
.../2.1.276: satisfies its Designated Requirement
```

### Steps to Reproduce

1. Install with the native installer on macOS 27.0, Apple silicon.
2. Keep one or two `claude` sessions running. For me it took anywhere from a few minutes to a few hours.
3. In a new shell, run `claude --version`. It prints nothing and exits 137.
4. Run `cp -c "$(readlink ~/.local/bin/claude)" /tmp/c && /tmp/c --version`. That works.

Workaround: swap the file for a fresh clone with `f=$(readlink ~/.local/bin/claude); cp -c "$f" "$f.new" && mv -f "$f.new" "$f"`. Running sessions keep the old inode, and new launches work until it happens again. I put this in a shell function that re-clones and retries once when `claude` exits 137 within 2 seconds.

### Claude Model

Not sure / Multiple models

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

2.1.276 (Claude Code)

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Other

### Additional Information

- macOS 27.0 (26A428), Mac16,1, Apple M4, SIP enabled
- Terminal is Ghostty with zsh
- Times above are local time

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is identified in the report. Start by reproducing the failure with the listed macOS commands and inspect the DiagnosticReports entries alongside the codesign verification output. Done means new launches continue to start successfully while existing sessions run, without requiring an inode replacement workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, zsh
Domain
cli, operating-systems, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.