Repository navigation
Description
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-designsoftware-securitywriting-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-agentssystematic-debuggingverification-before-completion
Steps to reproduce
- Configure
default_agentasdefault. - Configure
agent.default.permission.skillwith a restricted allowlist. - Start a new session using the
defaultagent. - Ask:
What skills are available to you? - 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
skilltool is exposed independently of per-agentpermission.skillrules. - 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.skillrules. - Deny
skilltool 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
github-actions commentedon Jun 22, 2026
This issue might be a duplicate of existing issues. Please check:
permission.skillrules are not enforced in the skill exposure flow (skills outside the allow-list still appear in the model's available skills)tasktool advertises subagents outside active agentpermission.taskallow-list #33334: Related issue by the same author — thetasktool similarly advertises subagents outside the active agent'spermission.taskallow-listIf 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.