[BUG] Settings files don't inherit from parent directories
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?
Description
Claude Code settings files (.claude/settings.json, .claude/settings.local.json) do not inherit from parent directories. Only CLAUDE.md files traverse up the directory tree.
This means if you have a monorepo structure like:
repos/
├── .claude/settings.local.json ← permissions defined here
├── repo-a/
├── repo-b/
└── repo-c/
Starting Claude Code from repos/repo-a/ will not pick up the permissions from repos/.claude/settings.local.json. You must either:
- Duplicate the settings into every sub-repo's
.claude/settings.local.json - Put everything in
~/.claude/settings.json(global)
What Should Happen?
Expected behavior
Settings should inherit from parent directories the same way CLAUDE.md files do, or there should be documentation clearly stating this limitation.
Current behavior
Settings only load from three fixed locations:
~/.claude/settings.json(global).claude/settings.json(project root).claude/settings.local.json(project root)
No parent directory traversal occurs. This is not documented and is surprising when you have a multi-repo workspace with shared permissions.
Suggested improvements
- Inherit settings from parent directories (same as
CLAUDE.md) - Or add
"extends": "../.claude/settings.local.json"support - At minimum, document the current behavior clearly
Error Messages/Logs
## Impact
- Users define permissions in a parent directory expecting them to apply to sub-repos — they silently don't
- Leads to repeated permission prompts that the user thought they had already resolved
- Forces either global settings (too broad) or per-repo duplication (maintenance burden)
Steps to Reproduce
- Put this to ~/dev/.claude/settings.json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"sandbox": {
"enabled": true,
"failIfUnavailable": true,
"allowUnsandboxedCommands": false,
"enableWeakerNetworkIsolation": false,
"network": {
"allowedDomains": [
"api.github.com",
],
"deniedDomains": ["*"],
"allowLocalBinding": true
}
},
"permissions": {
"defaultMode": "acceptEdits",
"disableBypassPermissionsMode": "disable",
"allow": ["Bash(curl *)"]
}
}
cdto ~/dev/subdirectory and launch claude there- Ask claude to reach api.github.com
- Claude will still prompt for auth
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.138
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗