You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(permission): ask should prefer most specific path rule for relative paths #14541
PermissionNext.ask evaluated only the raw incoming pattern. When tools passed relative paths, absolute path-scoped rules could lose to broad wildcard rules.
Expected
Path-scoped rules should apply consistently whether the tool path is relative or absolute, and more specific rules should win over generic ones.
Repro
Configure edit: "allow" globally and a scoped deny/allow rule under a specific directory.
Trigger an edit using a relative path inside that directory.
Observe wildcard behavior can override the scoped intent without absolute evaluation + specificity selection.
Proposed fix
In PermissionNext.ask, evaluate both relative and worktree-resolved absolute candidates, then choose the decision from the longest matched rule pattern.
No issue template was used. Please resubmit using one of the three required templates: Bug Report, Feature Request, or Question. The current format uses custom headings that don't match any template.
If this is a bug report, please use the Bug Report template which requires a Description field and reproduction steps in the expected format.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
Activity
github-actions commentedon Feb 21, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
ventsislav-georgiev commentedon Feb 21, 2026
Closing as duplicate of #13646, which tracks the same core permission-path precedence issue.
Related references: #11059 (historical, closed) and #13872 (similar edit-pattern behavior).
Implemented fix is in PR #14540.