Claude Code fixes a permission rule that matched too much
An allow rule like Edit(src/**) in .claude/settings.json is meant to auto-approve edits under one directory: <cwd>/src. Claude Code 2.1.214 (July 18, 2026) fixes a bug where it didn't stay that narrow.
What was wrong
The changelog entry: "Fixed single-segment dir/** allow rules like Edit(src/**) auto-approving writes to nested dir/ directories anywhere in the tree instead of only <cwd>/dir."
A single-segment pattern — one path component before /** — was matching any directory with that name at any depth. Edit(src/**) didn't just auto-approve <cwd>/src/**; it auto-approved edits under any src/ directory anywhere in the repo, including ones you never meant to grant: vendor/some-package/src/**, node_modules/whatever/src/**, a nested package's own src/. An allow rule scoped to your own source tree was silently wider than it looked.
The fix, and what stays broad on purpose
2.1.214 scopes single-segment dir/** allow rules to <cwd>/dir only, matching what the syntax implies. The same release applies the identical fix to hooks: "Changed single-segment dir/** hook if: conditions to match only <cwd>/dir; write **/dir/** for any-depth matching."
So if a hook's if: condition depended on the old any-depth matching, write it explicitly now as **/dir/**.
One thing did not change: deny and ask permission rules keep their any-depth match. That's deliberate — narrowing a deny(src/**) rule to only <cwd>/src would have made it less protective, silently. Only allow rules and hook conditions, where the bug made matching wider than intended, were tightened.
What to check
If your .claude/settings.json has single-segment allow rules like Edit(src/**), Write(dist/**), or similar, worth a quick audit: on 2.1.214 and later, they no longer reach same-named directories elsewhere in the tree. If you were relying on that broader match — intentionally or not — you'll need **/dir/** instead. See the Claude Code sheet for current permission-mode syntax.