[BUG] Write() and Edit() auto-approve patterns don't match relative paths in .claude/settings.json

Resolved 💬 3 comments Opened Jan 1, 2026 by tito-stack Closed Feb 16, 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?

Auto-approve patterns for Write and Edit tools in .claude/settings.json don't work with relative paths, even though Bash patterns do.

Observations:

  • Bash patterns like Bash(rm -rf reports:*) work correctly
  • Tried both reports/* and /reports/ — neither works
  • The Write tool seems to use absolute paths internally, so relative path patterns may never match.

What Should Happen?

Expected behavior:

Write(reports/*) should match writes to files in the reports/ directory relative to the project root, similar to how Bash patterns work.

Error Messages/Logs

None.

Steps to Reproduce

Reproduction:

  1. Add to .claude/settings.json:

```
{
"permissions": {
"allow": [
"Write(reports/*)",
"Edit(reports/*)"
]
}
}

  2. Run a skill/command that tries to write to reports/index.html
  3. Expected: Write succeeds without prompt (auto-approved)
  4. Actual: Permission prompt appears, or in non-interactive mode: "Permission to use Write has been auto-denied (prompts unavailable)"

### Claude Model

Sonnet (default)

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

2.0.76

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Warp

### Additional Information

_No response_

View original on GitHub ↗

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