Skip to content

[BUG] opencode's folder permission control is not working #11272

Closed

Description

@mask-maker

Description

The permission control for folders in opencode is not working. I set up opencode.json in the project root directory like this:

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "edit": "ask",
    "bash": {
      "*": "ask",
      "env *": "deny",
      "env": "deny",
      "printenv *": "deny",
      "printenv": "deny",
      "export *": "deny",
      "echo *": "deny",
      "set *": "deny"
    },
    "read": {
      "*": "allow",
      "*.log": "deny",
      "APP-META/**": "deny",
      "logs/**": "deny",
      "app/config/**": "deny",
      "*.env": "deny",
      "*.env.*": "deny",
      ".env": "deny",
      ".env.*": "deny",
      "*.env.local": "deny",
      "*.env.example": "allow"
    }
  }
}

However, opencode can still directly read the contents of the APP-META folder.

Plugins

No response

OpenCode version

1.1.44

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

macOS 26.2

Terminal

No response

Activity

  1. github-actions commented on Jan 30, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. github-actions commented on Apr 1, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions