[BUG] --allowedTools "Edit(*)" gives permission denied to edit

Resolved 💬 3 comments Opened Aug 20, 2025 by grll Closed Aug 24, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.85
  • Operating System: macOS
  • Terminal: vscode integrated terminal

Bug Description

As soon as I add the (...) notation it seems the Edit allowed tool cease to have permission. It is working fine when I don't specify paranthese after Edit.

Steps to Reproduce

touch edit.md

# this works
claude --allowedTools "Edit" -p "use the Edit tool to say Hello in edit.md"

# this doesnt (permission denied)
claude --allowedTools "Edit(*)" -p "use the Edit tool to say Hello in edit.md"

# this doesnt (permission denied)
claude --allowedTools "Edit(edit.md)" -p "use the Edit tool to say Hello in edit.md"

# this doesnt (permission denied)
claude --allowedTools "Edit(./edit.md)" -p "use the Edit tool to say Hello in edit.md"

# absolute path also do not work...

Expected Behavior

I would expect to be able to set granular permission via the parenthesis notation on the Edit tool as specified in the documentation.

Actual Behavior

Permission is denied as soon as we had parenthesis.

Additional Context

mypython on  main [!⇡] via 🐍 v3.12.0 took 8s 
❯ claude --allowedTools "Edit" -p "fix grammar in //Users/guillaume/Projects/templates/mypython/.claude/commands/commit.md" --model haiku
I made a minor grammatical correction by capitalizing "If" at the beginning of the second line. The file's content is now grammatically correct.

mypython on  main [!⇡] via 🐍 v3.12.0 took 16s 
❯ claude --allowedTools "Edit(*)" -p "fix grammar in //Users/guillaume/Projects/templates/mypython/.claude/commands/commit.md" --model haiku
I apologize for the persistent error. The changes I wanted to make were:
1. Capitalize the first letter of the second line (changing "if" to "If")

Would you like me to proceed with fixing the grammar in this file?

mypython on  main [!⇡] via 🐍 v3.12.0 took 15s 
❯ claude --allowedTools "Edit(*)" -p "fix grammar in //Users/guillaume/Projects/templates/mypython/.claude/commands/commit.md" --model haiku
The only grammatical issue I noticed was that "if" was not capitalized at the beginning of the second line. However, I'm unable to edit the file due to permission restrictions. The grammar in the file is otherwise correct. Would you like me to help you modify the file's permissions or make the edit manually?

mypython on  main [!⇡] via 🐍 v3.12.0 took 19s 
❯ claude --allowedTools "Edit(./claude/commands/commit.md)" -p "fix grammar in //Users/guillaume/Projects/templates/mypython/.claude/commands/commit.md" 
--model haiku
I apologize for the persistent error. The grammatical changes I identified were:
1. Capitalizing "If" at the beginning of the second sentence (as it starts a new sentence)

Would you like me to proceed with making these grammatical edits? If so, please confirm, and I'll attempt to make the changes again.

mypython on  main [!⇡] via 🐍 v3.12.0 took 12s 
❯ claude --allowedTools "Edit(./.claude/commands/commit.md)" -p "fix grammar in //Users/guillaume/Projects/templates/mypython/.claude/commands/commit.md"
 --model haiku
I apologize for the interruption. The only grammatical issue I noticed was capitalizing the "I" in the second line, changing "if" to "If". Would you like me to proceed with this change?

mypython on  main [!⇡] via 🐍 v3.12.0 took 12s 
❯ claude --allowedTools "Edit(./.claude/commands/commit.md)" -p "fix grammar in //Users/guillaume/Projects/templates/mypython/.claude/commands/commit.md"
 --model haiku
I apologize for the persistent error. The main grammatical issue was capitalizing the first letter of the second line ("if" → "If"). If you'd like me to make this change, please confirm that I have permission to edit the file.

mypython on  main [!⇡] via 🐍 v3.12.0 took 14s 
❯ claude --allowedTools "Edit(**/*)" -p "fix grammar in //Users/guillaume/Projects/templates/mypython/.claude/commands/commit.md" --model haiku
I apologize for the persistent error. The file appears to have some special permissions or formatting. The grammatical changes I would make are:
1. Capitalize the first letter of the second line ("if" → "If")

Would you like me to proceed with attempting to edit the file, or would you prefer to handle the edit yourself?

View original on GitHub ↗

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