You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Permission deny-all leaves built-in skill tool advertised to the model (re-injected with tool_choice=none on later turns); per-agent tools disable does not remove it #65738
With a fully deny-all permission configuration (root + agent, MCP disabled), OpenCode 2.2.5 strips most tools from the model request, but the built-in skill tool is re-injected into subsequent model requests with tool_choice: "none". Additionally, disabling it via per-agent config (tools: { skill: false }) does not remove it from the toolset either — the same tool_choice: "none" response is returned instead.
With tools: { "skill": false }: same result — skill advertised with tool_choice: "none", not removed.
A forced skill(...) tool-call (delivered deterministically via the fixture) is denied by the permission engine before any side effect; no session/request_permission callback is emitted (hard-deny semantics — confirmed).
Canary files unchanged; no side effects.
Expected
Tools excluded by PermissionNext.whollyDisabled should be filtered from every model request, not only the first.
Config-level tool disable (tools: { skill: false }) should remove the tool from the toolset entirely, not merely set tool_choice: "none".
Impact
For hard-sandboxed agent profiles (e.g., a read-only "arbiter" agent that must never invoke tools), the model still sees a tool it must never call. Runtime safety holds (denial-before-side-effect verified, tool_choice: "none" prevents calls at the API level), but the advertised-tool gap weakens defense-in-depth and pollutes model context.
Evidence
Model-request captures from a loopback fixture: tools_count, tool_names, tool_choice, request counts; forced-tool-call denial receipts (terminal failed, canary sha256 unchanged, zero side effects). Full probe implementation and receipts: content/tools/hermes_sandbox/ in MakSeeSky/sdlc-harness (probe tools-boundary-probe/v2, contours A/B).
Thanks for the detailed probe. From the code I read in the repository, V2 is meant to leave out any tool whose last matching permission rule denies it on every resource, and an agent's tools: { skill: false } becomes a deny rule like that. So skill showing up on a later request doesn't look intended.
One detail stands out, though. In the session runner, the only place I found that sets tool_choice: "none" is the step where the agent's steps limit is reached. Your second request may therefore depend on setup that the report doesn't show. To reproduce this without your harness, could you tell us in your own words, briefly:
Your exact config: the opencode.json(c) and the agent definition, including the permissions rules as written. Also, does the agent set steps?
How the session is started: the TUI, opencode run, an ACP client, or as a subagent of another session (you mention a "child session").
How the fixture provider is configured (the provider entry, without keys), and the prompts for both turns.
Whether this still happens on the latest release, 2.2.7.
You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know when you're done.
I didn't find an existing report of this exact problem. These are related, ordered by likelihood:
We're closing this for now because we haven't heard back. To reproduce the skill tool appearing in later requests with tool_choice: "none", we need your exact config (the permissions rules and the agent definition, including whether it sets steps), how the session is started (TUI, opencode run, ACP or as a subagent), and whether it still happens on 2.2.7. Without these we can't confirm what triggers it.
If you can share those details, just reply here and the issue will reopen.
Activity
opencodejr commentedon Nov 23, 2026
Thanks for the detailed probe. From the code I read in the repository, V2 is meant to leave out any tool whose last matching permission rule denies it on every resource, and an agent's
tools: { skill: false }becomes a deny rule like that. Soskillshowing up on a later request doesn't look intended.One detail stands out, though. In the session runner, the only place I found that sets
tool_choice: "none"is the step where the agent'sstepslimit is reached. Your second request may therefore depend on setup that the report doesn't show. To reproduce this without your harness, could you tell us in your own words, briefly:opencode.json(c)and the agent definition, including thepermissionsrules as written. Also, does the agent setsteps?opencode run, an ACP client, or as a subagent of another session (you mention a "child session").You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know when you're done.
I didn't find an existing report of this exact problem. These are related, ordered by likelihood:
execute@mention injects a denied skill without a permission checkopencodejr commentedon Nov 23, 2026
We're closing this for now because we haven't heard back. To reproduce the
skilltool appearing in later requests withtool_choice: "none", we need your exact config (thepermissionsrules and the agent definition, including whether it setssteps), how the session is started (TUI,opencode run, ACP or as a subagent), and whether it still happens on 2.2.7. Without these we can't confirm what triggers it.If you can share those details, just reply here and the issue will reopen.