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
permission.bash pattern maps: "*": "deny" fallback removes the bash tool from all agents; deny patterns under an allow fallback are ignored #36765
Two behaviors that together make permission.bash pattern maps unusable for least-privilege configs (verified on 1.17.18 with controlled single-variable probes — the three configs below differ only in the bash map):
A "*": "deny" fallback removes the bash tool from every agent's toolset entirely. With "bash": {"npm *": "allow", "ls *": "allow", "*": "deny"}, agents asked to enumerate their tools report no bash tool, and matching npm/ls commands can never run because the tool itself is gone. Tool visibility appears to be gated on the map's fallback verdict rather than per-invocation evaluation. Changing ONLY the fallback to "ask" or "allow" restores the tool.
Specific deny patterns under an allow fallback are silently ignored. With "bash": {"rm *": "deny", "*": "allow"}, rm -f ./x executes. (Untested: deny patterns under an "ask" fallback.)
Impact: an operator writing an allowlist with a deny fallback — the natural least-privilege shape, and the natural fix for headless ask-hangs — silently loses shell for all agents (which then hallucinate/fumble a tool they don't have); an operator writing a denylist gets no protection at all. The only working states are all-shell or no-shell.
Expected: tool visibility independent of the fallback verdict; per-invocation pattern evaluation with most-specific match winning; deny patterns honored regardless of fallback.
Plugins
None
OpenCode version
1.17.18
Steps to reproduce
Same prompt against three configs, only the bash map differs. Prompt: "List the exact tools available to you, then run ls -la."
Permission Wildcard * Overwriting Lower Permissions #24335: Permission Wildcard * Overwriting Lower Permissions — covers the related behavior where a "*": "deny" fallback blocks all access rather than serving as a fallback for unmatched patterns
If your issue has distinct aspects not covered by those (particularly the tool-visibility/removal behavior under a deny fallback), it may be worth keeping open separately.
Activity
github-actions commentedon Jul 13, 2026
This issue might be a duplicate of existing issues. Please check:
bashpermissiondenyrules are ignored when*: askis present #28682:bashpermissiondenyrules are ignored when*: askis present — covers the same bug where specific deny patterns are silently ignored under a catch-all fallback*Overwriting Lower Permissions — covers the related behavior where a"*": "deny"fallback blocks all access rather than serving as a fallback for unmatched patternsIf your issue has distinct aspects not covered by those (particularly the tool-visibility/removal behavior under a deny fallback), it may be worth keeping open separately.
github-actions commentedon Sep 13, 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.