claude-code - 💡(How to fix) Fix [BUG] apply-seccomp loses executable permission on every session launch (WSL2 / npm via nvm) [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#46264Fetched 2026-04-11 06:24:54
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5commented ×1unlabeled ×1

Error Message

Error: Exit code 126 /bin/bash: line 4: /home/<user>/.nvm/versions/node/v25.6.0/lib/node_modules/@anthropic-ai/claude-code/vendor/seccomp/x64/apply-seccomp: Permission denied

Fix Action

Fix / Workaround

  • Not sure exactly which was the last working Claude Code version. Problem started today, 4-10-26
  • Installed via npm (global, via nvm); Node v25.6.0
  • The binary is on the native Linux filesystem (not /mnt/c/), so this is not a Windows filesystem permission issue
  • stat confirms the file is a regular file, not a symlink
  • The file timestamp changes between sessions (e.g., rewritten at 09:28 after being chmod'd at 08:57), suggesting Claude Code re-extracts or overwrites the binary on launch or during auto-update
  • Current workaround: a shell alias in .bashrc that runs chmod +x on the binary before every launch

Code Example

Error: Exit code 126
/bin/bash: line 4: /home/<user>/.nvm/versions/node/v25.6.0/lib/node_modules/@anthropic-ai/claude-code/vendor/seccomp/x64/apply-seccomp: Permission denied
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

On WSL2 (Ubuntu), the apply-seccomp binary at vendor/seccomp/x64/apply-seccomp loses its executable permission on every new Claude Code session. Running chmod +x on the binary fixes it for that session, but the next time Claude Code launches, the file has been rewritten (confirmed via timestamp change) and the executable bit is gone again. This causes all Bash tool commands to fail.

This started after updating to a version that ships the apply-seccomp helper (per changelog: "Linux sandbox now ships the apply-seccomp helper in both npm and native builds"). Prior versions worked fine with no sandbox errors.

ls -l after a fresh session launch shows -rw-r--r-- (no executable bit) with a new timestamp, confirming the file was rewritten without the executable bit set.

What Should Happen?

The apply-seccomp binary should retain its executable permission across sessions, or the startup/update process should set the executable bit after extracting/rewriting the file.

Error Messages/Logs

Error: Exit code 126
/bin/bash: line 4: /home/<user>/.nvm/versions/node/v25.6.0/lib/node_modules/@anthropic-ai/claude-code/vendor/seccomp/x64/apply-seccomp: Permission denied

Steps to Reproduce

  1. Install Claude Code globally via npm on WSL2 using nvm
  2. Run chmod +x on vendor/seccomp/x64/apply-seccomp
  3. Confirm Bash tool commands succeed
  4. Close the session and open a new Claude Code session
  5. All Bash tool commands fail with exit code 126 / Permission denied
  6. ls -l on the binary shows -rw-r--r-- (no executable bit) and a fresh timestamp

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.87

Claude Code Version

2.1.100

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

  • Not sure exactly which was the last working Claude Code version. Problem started today, 4-10-26
  • Installed via npm (global, via nvm); Node v25.6.0
  • The binary is on the native Linux filesystem (not /mnt/c/), so this is not a Windows filesystem permission issue
  • stat confirms the file is a regular file, not a symlink
  • The file timestamp changes between sessions (e.g., rewritten at 09:28 after being chmod'd at 08:57), suggesting Claude Code re-extracts or overwrites the binary on launch or during auto-update
  • Current workaround: a shell alias in .bashrc that runs chmod +x on the binary before every launch

extent analysis

TL;DR

The apply-seccomp binary loses its executable permission on every new Claude Code session, which can be temporarily fixed by running chmod +x on the binary.

Guidance

  • Verify that the issue is indeed caused by the executable bit being removed from the apply-seccomp binary by checking the file permissions with ls -l after a fresh session launch.
  • Consider modifying the startup script or update process to set the executable bit after extracting/rewriting the file, potentially using a command like chmod +x in the installation or update script.
  • As a temporary workaround, use a shell alias in .bashrc to run chmod +x on the binary before every launch, as mentioned in the issue.
  • Investigate the changelog mention of the "Linux sandbox now ships the apply-seccomp helper" to see if this change is related to the issue.

Example

No code snippet is provided as it's not clearly supported by the issue, but an example of how to set the executable bit in a script could be: chmod +x /path/to/apply-seccomp.

Notes

The issue seems to be related to the update that ships the apply-seccomp helper, and it's not clear if this is a bug or an intended behavior. The fact that the file timestamp changes between sessions suggests that Claude Code is re-extracting or overwriting the binary on launch or during auto-update.

Recommendation

Apply workaround: use a shell alias in .bashrc to run chmod +x on the binary before every launch, as this provides a temporary solution to the issue until a more permanent fix can be found.

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