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
Paths in edit permissions don't work well for teams with varying paths #13888
If you're a team of people with your code at different paths and want to allow a specific path to be edited, you can do it like this:
"edit": {
"*": "ask",
"some\\path\\to\\file\\**": "allow",
},
```
But this doesn't work, because edit has workspace path (without drive letter) prefixed, like this `src\\some\\path\\to\\file\\file.txt`, so the only solution is to prefix the path with `**` but that's not the same permission I stated above, because it matches ANY prefix to the path.
### Plugins
_No response_
### OpenCode version
1.50.0
### Steps to reproduce
add this to your config
//
"edit": {
"*": "ask",
"test\\**": "allow",
},
```
run `opencode run "write the word FOO to test/permissions.txt"`
This command will fail, reporting that the permission required "ask" access and was auto-rejected, despite explicitly setting it to "Allow" above.
### Screenshot and/or share link
_No response_
### Operating System
Windows 11
### Terminal
WezTerm
These issues describe related problems with path matching in the permissions system. Consolidating discussion may help identify if this is a single underlying bug affecting path pattern matching.
looking closer, this seems like a bug -- the edit tool has this: [path.relative(Instance.worktree, filepath)]
Which makes me think this is a windows-specific bug wher path.relative just chops off the drive letter, rather than actually makeing the path relative.
Activity
github-actions commentedon Feb 16, 2026
This issue might be a duplicate of or closely related to existing issues. Please check:
These issues describe related problems with path matching in the permissions system. Consolidating discussion may help identify if this is a single underlying bug affecting path pattern matching.
jcowles commentedon Feb 16, 2026
It would be nice if ".\path" implied the worktree root.
jcowles commentedon Feb 16, 2026
looking closer, this seems like a bug -- the edit tool has this:
[path.relative(Instance.worktree, filepath)]Which makes me think this is a windows-specific bug wher path.relative just chops off the drive letter, rather than actually makeing the path relative.
rekram1-node commentedon Feb 16, 2026
I think there is a bug for permissions on windows specifically yeah. We will fix.
github-actions commentedon Apr 22, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.