anomalyco / anomalyco/opencode
Skills advertised despite session deny
@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
- Start session with a skill denied through session permission overrides.
- Inspect system prompt or available skill list.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.