[BUG] EACCES: permission denied when creating Python file after granting write permission

Resolved 💬 3 comments Opened Feb 20, 2026 by Leslie-23 Closed Feb 24, 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?

EACCES: permission denied

EACCES: permission denied, open 'test.py'
Error: Unable to write file
at Object.openSync (node:fs:xxxx:x)
at Object.writeFileSync (node:fs:xxxx:x)

What Should Happen?

EACCES: permission denied, open 'test.py'
Error: Unable to write file
at Object.openSync (node:fs:xxxx:x)
at Object.writeFileSync (node:fs:xxxx:x)

Error Messages/Logs

Steps to Reproduce

Create a Python file:

touch test.py


Add this content:

def hello():
    print("test")


Run:

claude "add type hints to test.py"


When prompted for file access, accept.

Claude immediately throws:

EACCES: permission denied


File is not modified.

Steps to Reproduce

Steps to Reproduce

Create a Python file:

touch test.py

Add this content:

def hello():
print("test")

Run:

claude "add type hints to test.py"

When prompted for file access, accept.

Claude immediately throws:

EACCES: permission denied

File is not modified.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

claude code (web)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗