Permission-rule warning names the main checkout's settings.local.json for rules in a linked worktree's file

Status Open
Reported on v2.1.286
Maintainer reply None cached
Activity 0 comments · opened Oct 1, 2026

Version: 2.1.286, macOS

A session started in a linked git worktree loads .claude/settings.local.json from both the worktree and the main checkout. When a rule is invalid, the startup warning names the main checkout's file (../<main>/.claude/settings.local.json) even when the bad rule is only in the worktree's file.

Repro

  1. Main checkout repo/, linked worktree repo-wt/, each with its own regular .claude/settings.local.json (no symlinks).
  2. Add "Bash(zzprobe\"*.:*)" to permissions.allow in only repo-wt/.claude/settings.local.json.
  3. From repo-wt/, run claude -p "ok".

Actual: Permission allow rule (../repo/.claude/settings.local.json): Bash(zzprobe"*.:*) mixes * with the trailing :* prefix syntax…

Expected: the label names .claude/settings.local.json, the file that actually holds the rule.

The debug log shows the merged local rules: Adding 793 allow rule(s) to destination 'localSettings', which is the union of both files plus the probe. If the merge is intended, the warning still needs to name the file the rule came from, so you know which one to edit.

View original on GitHub ↗