Description
Provider: OpenCode Zen (opencode/big-pickle)
Config: ~/.config/opencode/opencode.json / jsonc
Shell: zsh
I wanted to restrict the agent from reading certain personal folders when using cloud models. The permission system seemed perfect for this, but granular deny rules on read, glob, and grep never block access despite the config loading correctly.
What works:
Global deny ("read": "deny") correctly removes the read tool entirely
opencode debug config confirms rules are loaded into resolved config
Config validates as valid JSON
What doesn't work:
Granular deny rules never match file paths. Tested all following pattern formats in read, glob, and grep permissions — none blocked access:
"*/Documents/*": "deny" # wildcard prefixes
"*Documents*": "deny" # substring
"Documents": "deny" # bare names
"/home/user/Documents": "deny" # exact absolute
Also tested:
Removing "*": "allow" entirely (falling through to default allow)
Restarting both opencode and terminal between config changes
Applying same rules to glob and grep permissions
Expected behavior:
Setting "read": { "Documents": "deny" } should prevent the agent from reading files whose path contains "Documents".
Actual behavior:
All file reads succeed regardless of deny rules.
OpenCode version
Version: 1.15.4
Operating System
Linux (CachyOS, kernel 7.0.8-1-cachyos)
Terminal
konsole (xterm-256color)
Description
Provider: OpenCode Zen (opencode/big-pickle)
Config: ~/.config/opencode/opencode.json / jsonc
Shell: zsh
I wanted to restrict the agent from reading certain personal folders when using cloud models. The permission system seemed perfect for this, but granular deny rules on read, glob, and grep never block access despite the config loading correctly.
What works:
Global deny ("read": "deny") correctly removes the read tool entirely
opencode debug config confirms rules are loaded into resolved config
Config validates as valid JSON
What doesn't work:
Granular deny rules never match file paths. Tested all following pattern formats in read, glob, and grep permissions — none blocked access:
Also tested:
Expected behavior:
Setting "read": { "Documents": "deny" } should prevent the agent from reading files whose path contains "Documents".
Actual behavior:
All file reads succeed regardless of deny rules.
OpenCode version
Version: 1.15.4
Operating System
Linux (CachyOS, kernel 7.0.8-1-cachyos)
Terminal
konsole (xterm-256color)