Permission-rule warning names the main checkout's settings.local.json for rules in a linked worktree's file
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
- Main checkout
repo/, linked worktreerepo-wt/, each with its own regular.claude/settings.local.json(no symlinks). - Add
"Bash(zzprobe\"*.:*)"topermissions.allowin onlyrepo-wt/.claude/settings.local.json. - From
repo-wt/, runclaude -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.