[BUG] "Don't ask again" permission rule for Bash commands not persisting across sessions

Resolved 💬 3 comments Opened Mar 5, 2026 by mvanderzalm Closed Mar 9, 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?

When prompted to approve a Bash command that writes to /tmp, selecting option 2 ("Yes, and don't ask again for: /tmp/commit-msg.txt:*") does not persist the allow rule. The same prompt appears every session, and even within the same session after selecting option 2.

What Should Happen?

Selecting option 2 should create/update a project-level settings.json at ~/.claude/projects/<project-hash>/settings.json with the allow rule, and the command should not prompt again.

Actual behavior:

  • Option 2 is selected, command runs successfully
  • No settings.json file is created in the project directory
  • The prompt reappears on next invocation (same session and across sessions)

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in a project
  2. Trigger a Bash command that writes to /tmp (e.g. cat > /tmp/commit-msg.txt<<'EOF' ... EOF)
  3. Select option 2: "Yes, and don't ask again for: /tmp/commit-msg.txt:*"
  4. Trigger the same command pattern again
  5. Observe: prompted again despite selecting "don't ask again"
  6. Check ~/.claude/projects/<project-hash>/settings.json — file does not exist

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.69 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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