"Don't ask again" permission not persisted when project settings.json doesn't exist
Resolved 💬 3 comments Opened Feb 26, 2026 by verndemille Closed Mar 1, 2026
Description
When selecting "Yes, and don't ask again for: lsof:*" (or any Bash command pattern) in the permission prompt, the permission is not persisted. The very next time the same command is invoked, the permission prompt appears again.
Root Cause
The project-level settings file at ~/.claude/projects/<project-path>/settings.json does not exist, and the "don't ask again" flow does not appear to create it. The permission is only held in-memory for that single turn and is lost immediately.
Expected Behavior
Selecting "Yes, and don't ask again" should:
- Create the project-level
settings.jsonfile if it doesn't already exist - Persist the permission pattern (e.g.,
Bash(lsof:*)) to that file - Not re-prompt for matching commands in the same session or future sessions
Actual Behavior
- Permission prompt reappears on the very next invocation of the same command
- No
settings.jsonfile is created in the project settings directory - The directory exists (
~/.claude/projects/-Users-vdemille-GitHub/) with session logs but nosettings.json
Steps to Reproduce
- Start Claude Code in a directory where
~/.claude/projects/<project-path>/settings.jsondoes not exist - Trigger a Bash command that requires permission (e.g.,
lsof -i :3000) - Select "Yes, and don't ask again for: lsof:*"
- Trigger another
lsofcommand - Observe: permission prompt appears again
Environment
- macOS (Darwin 25.3.0)
- Claude Code CLI
- Global
settings.jsonexists and works fine at~/.claude/settings.json - Project settings directory exists but contains no
settings.json
Workaround
Manually add the permission to the global ~/.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(lsof *)"
]
}
}This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗