Skip to content

Per-agent skill permissions do not limit the skills exposed to the default agent #33336

Closed

Description

@hildebrandt

Description

Summary

The default agent is configured with a small permission.skill allowlist, but the active session exposes the full skill catalog to the model. This makes the configured per-agent skill permissions ineffective as a visibility boundary and possibly ineffective as an execution boundary.

Impact

  • The model can see many skill descriptions that are not allowed for the configured agent.
  • If execution is also not blocked, the agent can invoke skills outside its configured allowlist.
  • This weakens least-privilege agent design and makes per-agent permission review misleading.
  • The prompt may contain irrelevant or disallowed operational instructions from unrelated skills.

Relevant configuration

opencode.json sets the default agent to default:

{
  "default_agent": "default"
}

The default agent is configured as a primary agent:

{
  "agent": {
    "default": {
      "mode": "primary",
      "permission": {
        "skill": {
          "dispatching-parallel-agents": "allow",
          "systematic-debugging": "allow",
          "verification-before-completion": "allow"
        }
      }
    }
  }
}

Actual behavior

When asking the active default agent what skills are available, the session exposes the full loaded skill catalog, including many skills not present in agent.default.permission.skill, such as:

  • frontend-design
  • software-security
  • writing-skills

This appears to come from the system-injected <available_skills> block rather than the agent permission allowlist.

Expected behavior

For the default agent, skill visibility and skill execution should be constrained to agent.default.permission.skill.

Expected visible and usable skills:

  • dispatching-parallel-agents
  • systematic-debugging
  • verification-before-completion

Steps to reproduce

  1. Configure default_agent as default.
  2. Configure agent.default.permission.skill with a restricted allowlist.
  3. Start a new session using the default agent.
  4. Ask: What skills are available to you?
  5. Observe that the model sees the full skill catalog instead of the restricted allowlist.

Suspected causes

  • The full skill catalog is injected into the model prompt before per-agent permission filtering.
  • The skill tool is exposed independently of per-agent permission.skill rules.
  • API or plugin-driven sessions may bypass the normal opencode permission filtering path.

Desired fix

  • Filter the system-injected skill catalog by the active agent's permission.skill rules.
  • Deny skill tool calls for skills not allowed by the active agent.
  • Make visibility and execution behavior consistent across TUI, API, and plugin-driven sessions.
  • Optionally warn on unknown skill names in permission.skill

Plugins

none

OpenCode version

1.17.9

Operating System

Nix Linux

Terminal

WezTerm via SSH

Activity

  1. github-actions commented on Jun 22, 2026

    @github-actions
    Contributor

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

    If you believe your report covers a distinct aspect not addressed by those issues, please note the difference. Otherwise, consider adding details or a +1 to the existing issues.

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

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