Permission Rules Should Merge Instead of Override

Resolved 💬 3 comments Opened Mar 21, 2026 by shayin Closed Mar 25, 2026

Feature Request: Permission Rules Should Merge Instead of Override

Problem

When selecting "Allow and remember" (允许并记住) for a permission request, the tool writes the permission rule to the local settings.local.json file, which completely replaces the global permissions configuration.

Current Behavior

Global permissions: [A, B, C]
User adds local: [D, E, F]
Result: [D, E, F]  ❌ Completely overrides global

Expected Behavior

Global permissions: [A, B, C]
User adds local: [D, E, F]
Result: [A, B, C, D, E, F]  ✅ Merge global + local

Or at least keep global as the baseline and only add new rules.

Why This Matters

  1. Global permissions are designed as a baseline for all projects
  2. Local configurations should be extensions, not replacements
  3. Current behavior defeats the purpose of having a robust global permissions setup
  4. Every time "Allow and remember" is used in a new project, global permissions get clobbered

Example Use Case

User has these global permissions:

  • Bash(git:*)
  • Read
  • Bash(python3:*)
  • Bash(npm:*)

In a new project, encountering Bash(pip3 install), user selects "Allow and remember".

Current result: Local permissions now only contain Bash(pip3 install), losing git:*, Read, python3, npm - breaking existing workflows.

Expected result: Local permissions should be git:*, Read, python3, npm, Bash(pip3 install).

Suggested Solution

When "Allow and remember" is selected:

  1. If settings.local.json doesn't exist, create it with the new permission
  2. If settings.local.json exists and contains permissions, merge instead of replace:
  • Keep all global permissions
  • Add new permission if not already present
  • Optionally allow local to override specific permissions if explicitly configured

Workaround

Currently, users must manually edit ~/.claude/settings.json after each "Allow and remember" action, which is:

  • Tedious
  • Easy to forget
  • Counter to the tool's "remember" UX intent

View original on GitHub ↗

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