settings.local.json created despite project rules prohibiting it
Resolved 💬 3 comments Opened Mar 14, 2026 by jamieadams-nerd Closed Mar 18, 2026
Description
Claude Code automatically creates .claude/settings.local.json when a user grants a one-time permission interactively, even when the project already has .claude/settings.json and project rules (in CLAUDE.md) explicitly prohibit creating settings.local.json.
Expected behavior
- Claude Code should respect project-level rules that opt out of local settings files
- Alternatively, merge granted permissions directly into the existing
settings.jsoninstead of creating a parallel file - At minimum, provide a project-level configuration option to disable
settings.local.jsoncreation
Actual behavior
- Every interactive permission grant creates or appends to
.claude/settings.local.json - This happens regardless of CLAUDE.md rules prohibiting the file
- The file reappears immediately after deletion if any new permission is granted
- Project maintainers must repeatedly clean up the file manually
Reproduction steps
- Create a project with
.claude/settings.jsoncontaining existing permissions - Add a rule to CLAUDE.md: "NEVER create settings.local.json"
- Run Claude Code and grant any interactive permission
- Observe that
.claude/settings.local.jsonis created despite the rule
Workaround
We've implemented a SessionStart hook that merges settings.local.json into settings.json and deletes it at the start of every session. This works but shouldn't be necessary.
Impact
In projects with strict configuration management requirements (e.g., high-assurance/compliance environments), uncontrolled settings file proliferation is a governance issue. The project rules exist for a reason — the runtime should respect them.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗