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
read permission patterns are evaluated as absolute paths, not worktree-relative like edit/write/apply_patch #26524
read permission patterns are evaluated against the absolute file path, while edit / write / apply_patch patterns are evaluated against the path relative to the worktree. A user rule like "read": { "src/*": "deny" } therefore silently fails to match, even though the equivalent "edit": { "src/*": "deny" } works.
Root cause is in packages/opencode/src/tool/read.ts:181: patterns: [filepath] (absolute), versus path.relative(instance.worktree, filePath) that the other file tools use.
Ask the agent to edit src/foo.ts → "src/*" matches the worktree-relative src/foo.ts → denied (correct).
Ask the agent to read src/foo.ts → "src/*" is matched against the absolute /abs/path/.../src/foo.ts → does NOT match → falls back to "*": "allow" → read goes through anyway (bug).
Same rule, same file, different outcome — purely because of the absolute-vs-relative pattern asymmetry.
Activity