claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Write tool permissions not respected despite being in allowed list

Open TimHolahan opened this issue 11 months ago • 1 comments

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?

The Write tool prompts for permission even when Write(//tmp/**) is explicitly configured in both global and project-level settings files. The permission appears correctly in the system prompt's allowed tools list, but Claude Code still requests user approval for every Write operation to /tmp/.

What Should Happen?

Expected: File is written without prompting for permission Actual: Claude Code prompts for permission approval

Error Messages/Logs


Steps to Reproduce

Steps to reproduce

  1. Add Write(//tmp/**) to ~/.claude/settings.json:

    {
      "permissions": {
        "allow": [
          "Write(//tmp/**)"
        ],
        "defaultMode": "default"
      }
    }
    
  2. Also add Write(//tmp/**) to project-level .claude/settings.local.json in the allow array

  3. Restart Claude Code

  4. Ask Claude to write a file to /tmp/:

    Write a test file to /tmp/test-file.md
    

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.0.64

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

No response

TimHolahan avatar Dec 11 '25 01:12 TimHolahan

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/13340
  2. https://github.com/anthropics/claude-code/issues/1188
  3. https://github.com/anthropics/claude-code/issues/6881

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 11 '25 01:12 github-actions[bot]

This issue has been automatically closed as a duplicate of #13340.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 14 '25 09:12 github-actions[bot]