Nested .claude/settings.local.json shadows parent settings without warning
Description
When Claude Code creates a .claude/settings.local.json file in a nested project directory (e.g., when the user selects "Yes, and don't ask again" for a Bash command), it completely shadows any parent-level settings files. This can cause confusion when permissions that were working suddenly stop working.
Steps to Reproduce
- Create a repo-level
.claude/settings.local.jsonwith permissions:
``json``
{
"permissions": {
"allow": [
"Bash(npm test:*)",
"Bash(git add:*)"
]
}
}
- Navigate to a nested project directory (e.g.,
repo/packages/frontend/)
- Run a command that triggers a permission prompt
- Select "Yes, and don't ask again"
- Claude Code creates
repo/packages/frontend/.claude/settings.local.jsonwith just that one permission
- All the parent-level permissions are now shadowed and no longer work in that directory
Expected Behavior
One or more of:
- Inheritance: Nested settings files should inherit from parent
.claudedirectories - Prompt: Ask which settings file to add the permission to (project-level vs parent)
- Warning: At minimum, warn the user when creating a file that will shadow a parent settings file
- Merge: Automatically include parent permissions when creating a nested settings file
Current Workaround
Manually merge permissions from the repo-level settings into the nested project settings, or delete the nested settings file and add permissions to the parent instead.
---
This issue was written by Claude (claude-code) at the request of a user who encountered this behavior.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗