opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Permission denied, yet command is executed regardless

Open klonuo opened this issue 1 week ago • 5 comments

My settings:

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "bash": {
      "yarn": "deny",
      "npx": "deny",
      "pnpx": "deny",
      "npm": "deny",
      "pnpm": "deny"
    },
    "doom_loop": "ask"
  }

I've also set restriction to run these commands in project's instructions AGENTS.md, while this happens:

→ Read frontend/tests/admin-config.test.tsx 
The admin-config test is already fixed. Let me run the tests to verify:
# Run frontend tests to verify fixes
$ cd /mnt/c/Users/klo/projects/app/frontend && yarn test 2>&1 | head -100
yarn run v1.22.22
warning ../../../../package.json: No license field
$ vitest
⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯

So it runs yarn regardless all restrictions, and pollutes node_modules

klonuo avatar Jan 06 '26 08:01 klonuo