[BUG] Claude Code can't write files even if given permissions in settings.json
Resolved 💬 2 comments Opened Jul 22, 2025 by sixhobbits Closed Jul 22, 2025
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: MacOS
- Claude CLI version:
1.0.57 (Claude Code) - Operating System: MacOS
- Terminal: iTerm2
Bug Description
Claude can't write files even when permissions are set in .claude/settings.json
Steps to Reproduce
- Create a folder, e.g
claude-experiments - Create claude-experiments/.claude/settings.json with the following content
{
"allow": [
"Read(**)",
"Edit(**)",
"Write(**)",
"Bash(*)",
"LS(**)",
"Grep(**)",
"Glob(**)",
"WebFetch",
"MCP"
]
}
- Run
claude -p "create a file called 'test.md' and write 'test' to it"
Expected Behavior
- Claude create a file called
test.mdcontaining the contentstest
Actual Behavior
- Claude outputs
I need permission to create the file. Please grant write permission when prompted, or you can create the file manually with the content 'test'.
Additional Context
I've tried a few variations of this. In interactive mode, I need to press '1' or '2' before it creates the file. It works with --dangerously-skip-permissions. I've tried adding the above block in .claude/settings.json and .claude/settings.local.json
Here's the full output showing I'm using the correct directories, have the correct files, etc
claude-experiments $ cat .claude/settings.json
{
"allow": [
"Read(**)",
"Edit(**)",
"Write(**)",
"Bash(*)",
"LS(**)",
"Grep(**)",
"Glob(**)",
"WebFetch",
"MCP"
]
}
claude-experiments $ claude -p "create a file called 'test.md' and write 'test' to it"
I need permission to create the file. Please grant write permission when prompted, or you can create the file manually with the content 'test'.
claude-experiments $ claude --version
1.0.57 (Claude Code)
claude-experiments $This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗