macOS Gatekeeper warning for extracted .node native addon
Description
On macOS, a Gatekeeper warning dialog repeatedly appears when using Claude Code:
".7fd3dfffbffbbd2f-00000000.node" Not Opened Apple could not verify ".7fd3dfffbffbbd2f-00000000.node" is free of malware that may harm your Mac or compromise your privacy.
Environment
- Claude Code version: 2.0.75
- macOS: Darwin 25.1.0 (Sequoia)
- Architecture: arm64
Root Cause Analysis
The file .7fd3dfffbffbbd2f-00000000.node appears to be a native addon (likely better-sqlite3) that Bun extracts at runtime from the compiled binary.
The Claude Code binary itself is properly signed:
Authority=Developer ID Application: Anthropic PBC (Q6L2SF6YDW)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
However, when Bun extracts native .node modules to temp directories at runtime, these extracted files don't inherit the code signature from the parent binary. macOS Gatekeeper sees an unsigned binary and shows the warning.
Running spctl --assess on the Claude binary returns:
rejected (the code is valid but does not seem to be an app)
Steps to Reproduce
- Install Claude Code on macOS
- Run
claudein terminal - The Gatekeeper warning appears (may be intermittent depending on when native modules are loaded)
Expected Behavior
No Gatekeeper warnings should appear for signed, distributed software.
Possible Solutions
- Pre-sign the extracted native addons
- Use Bun's
--compilewith proper entitlements for extracted resources - Bundle the native addon differently so it doesn't require runtime extraction
- Add the extracted path to Gatekeeper exceptions during installation
Workaround
Users can click "Done" (not "Move to Trash") when the dialog appears. The file is safe - it's Claude Code's SQLite bindings.
🤖 Generated with Claude Code
4 Comments
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still experiencing this issue on macOS Sequoia (Darwin 24.6.0) with Claude Code 2.1.17. The only effective workaround is disabling Gatekeeper entirely (
sudo spctl --master-disable), which is not ideal.Experiencing this on Windows 11 — 14 GB of
.nodefiles accumulated in%TEMP%Environment:
npxData collected:
.nodefiles in%TEMP%, totaling ~14.18 GB%TEMP%folder reached 61.8 GBRoot cause analysis:
Each Claude Code session spawns multiple Node.js processes (CLI + MCP servers). Bun extracts
better-sqlite3as a new uniquely-named.nodeDLL per process, and never cleans up on exit. With 3+ MCP servers per session, this generates ~7+ DLL extractions per session, none of which are reused or deleted.Impact: Significant disk space consumption with no user-facing indication of the problem.
@GabbriOunon join us over on #23095 for the similar but distinct Windows problem