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
Absolute-path permission rules never match (tool patterns are worktree-relative) #48193
Permission rules written as absolute paths never take effect. Tools produce patterns via path.relative(worktree, filePath), so a path like /czk/mem/facts/me.md in a project at /czk/mem arrives as:
inside the worktree: facts/me.md (relative)
outside the worktree: ../../czk/... (traversal)
no git context: czk/... (de-rooted)
So a rule like {"edit": {"/czk/**": "allow"}} can never match, and users get repeated permission prompts despite having allowed the path.
Expected: absolute rules match the actual file path. Actual: only the relative form is evaluated (packages/opencode/src/permission/index.ts, evaluate()).
Activity
github-actions commentedon Sep 9, 2026
This issue might be a duplicate of existing issues. Please check:
permission/index.tsandtool/read.ts/tool/edit.tswrite.ts,edit.tssubmitting worktree-relative paths, with identical fail-open security implicationsthdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊