anomalyco / anomalyco/opencode
Permission ask/deny patterns not enforced in serve (`-s`) sessions, v1.18.30
Open
@neriousy is already working on this.
Since Sep 9, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Repro (all in one session, Windows 11, opencode-ai 1.18.30, opencode.exe -s <id>):
- Config
permission.bash["*guard-test-marker*"] = "ask"→echo guard-test-markerruns clean, no prompt. - Same with
"deny"→ runs clean. - Config
permission.write/edit["*canary\\denyt*"] = "deny"→ write tool creates the file. - 50+
external_directorytouches outside cwd across the session → never a prompt. "shell"config key pointing at a logging shim → no invocations logged; commands unaffected.
Expected: ask prompts / denials. Actual: everything allowed, silently.
Related upstream: #7474 (subagent perms), #7063 (denied-yet-executed), #6396 (SDK ignores denies), #9853, #11272. Novel dimension here: enforcement absent for main AND subagent in serve transport, including file tools, not just bash.
Ask: is permission enforcement TUI-only by design? If so, docs should say so and serve should warn. If not, this is the repro.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.