anomalyco / anomalyco/opencode

Skills advertised despite session deny

Open
#38,337 1 comment 1 reaction 1 assignee View on GitHub

@kitlangton is already working on this.

Since Jul 22, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Description

Skills denied by session permissions can still appear in system-prompt skill advertisement. Selecting one then returns a permission denial.

Environment

  • OpenCode version: 1.18.4
  • OS: Linux

Expected

Denied skills are excluded from advertised available skills, or marked unavailable.

Actual

skill.available(agent) checks only agent permission, so denied skills remain advertised. Loading invokes context permission checks and returns deny.

customize-opencode is registered before disk scan in packages/opencode/src/skill/index.ts:276-284. Advertisement uses skill.available(agent) at packages/opencode/src/skill/index.ts:310-315 and system prompt lists skills at packages/opencode/src/session/system.ts:98-110,1257-1269. Session overrides merge in packages/opencode/src/session/tools.ts:81-89; deny is returned by packages/opencode/src/permission/index.ts:72-80.

Proposed behavior

Filter advertised skills using effective session permissions before adding them to system prompt to reduce context rot and wasteful skill tool calls.

Plugins

No response

OpenCode version

1.18.4

Steps to reproduce
  1. Start session with a skill denied through session permission overrides.
  2. Inspect system prompt or available skill list.
  3. Attempt to load denied skill.
Screenshot and/or share link

No response

Operating System

Linux

Terminal

Tested on opencode build-in web server

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.