Skip to content

Agent permission rules (permission.ask) not enforced at runtime #32787

Description

@rbarcenas-mx

Description

When an agent is declared in opencode.json with permission rules (e.g., "edit": "ask"), the runtime does not actually enforce them. The model/agent proceeds to execute the tool without asking for confirmation.

Plugins

No response

OpenCode version

1.17.8

Steps to reproduce

  1. Configure an agent with restricted permissions:
    "deepseek": {
    "mode": "primary",
    "model": "deepseek/deepseek-chat",
    "permission": {
    "edit": "ask"
    }
    }

  2. Select the deepseek agent.

  3. Ask it to edit a file - it edits without prompting.Expected behavior: Before performing an edit, bash, grep, etc., the runtime should check the agent's permission block and prompt the user if the value is "ask".

Actual behavior: Permissions are declared but never evaluated. The agent executes tools freely regardless of the permission settings

Screenshot and/or share link

No response

Operating System

Ubuntu 26.04

Terminal

VS Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions