Preflight Checklist
What's Wrong?
When I run a Claude command like claude "create a new Python file" or claude "add type hints to test.py", Claude shows an error "EACCES: permission denied" and the file isn't created.
The command fails immediately after accepting the file write permission prompt. The error occurs consistently across multiple commands that involve file creation or modification.
What Should Happen?
Claude should execute the command successfully and create or modify the Python file without any permission errors. The file write operation should complete after the user accepts the permission prompt.
Error Messages/Logs
Error: EACCES: permission denied, open '/path/to/project/test.py'
at Object.openSync (node:fs:601:3)
at Object.writeFileSync (node:fs:2249:35)
at ClaudeCode.writeFile (/usr/local/lib/node_modules/@anthropic-ai/claude-code/dist/index.js:123:10)
at async ClaudeCode.executeCommand (/usr/local/lib/node_modules/@anthropic-ai/claude-code/dist/index.js:456:5)
Steps to Reproduce
- Create a new project directory:
mkdir my-project && cd my-project
- Run a Claude command:
claude "create a Python file called hello.py that prints Hello World"
- When prompted for file write access, accept/allow the permission
- Observe the error: "EACCES: permission denied"
- The file
hello.py is not created in the directory
Note: This also happens with commands that modify existing files, e.g., claude "add type hints to existing_file.py"
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
1.0.100
Claude Code Version
1.0.123 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
Preflight Checklist
What's Wrong?
When I run a Claude command like
claude "create a new Python file"orclaude "add type hints to test.py", Claude shows an error "EACCES: permission denied" and the file isn't created.The command fails immediately after accepting the file write permission prompt. The error occurs consistently across multiple commands that involve file creation or modification.
What Should Happen?
Claude should execute the command successfully and create or modify the Python file without any permission errors. The file write operation should complete after the user accepts the permission prompt.
Error Messages/Logs
Error: EACCES: permission denied, open '/path/to/project/test.py' at Object.openSync (node:fs:601:3) at Object.writeFileSync (node:fs:2249:35) at ClaudeCode.writeFile (/usr/local/lib/node_modules/@anthropic-ai/claude-code/dist/index.js:123:10) at async ClaudeCode.executeCommand (/usr/local/lib/node_modules/@anthropic-ai/claude-code/dist/index.js:456:5)Steps to Reproduce
mkdir my-project && cd my-projectclaude "create a Python file called hello.py that prints Hello World"hello.pyis not created in the directoryNote: This also happens with commands that modify existing files, e.g.,
claude "add type hints to existing_file.py"Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
1.0.100
Claude Code Version
1.0.123 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response