[BUG] Claude Code v2.1.78 rejecting edits in `.claude` dir in `dontAsk` mode

Resolved 💬 4 comments Opened Mar 18, 2026 by mt-krainski Closed Apr 23, 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?

Claude Code is rejecting Edits to files in the project .claude directory in dontAsk mode.

I am allowing the Edit tool as well as I have a hook for allowing edits only in the project dir.

This properly worked yesterday with version 2.1.77

What Should Happen?

Edits should be allowed.

Error Messages/Logs

⏺ Update(/Users/mateusz/Projects/twinkletaps/.claude/skills/wrap/SKILL.md)
  ⎿  Error: Permission to use Edit has been denied because Claude Code is running in don't ask mode. IMPORTANT: You *may* attempt to
     accomplish this action using other tools that might naturally be used to accomplish this goal, e.g. using head instead of cat. But
     you *should not* attempt to work around this denial in malicious ways, e.g. do not use your ability to run tests to execute non-test
     actions. You should only try to work around this restriction in reasonable ways that do not attempt to bypass the intent behind this
     denial. If you believe this capability is essential to complete the user's request, STOP and explain to the user what you were trying
      to do and why you need this permission. Let the user decide how to proceed.\

Steps to Reproduce

  1. Allow the Edit or Write tool in .claude/settings.json
  2. Ask claude to create or edit a file in the .claude directory

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.77

Claude Code Version

2.1.78

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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