Repository navigation
Open
Labels
status/repro-simulatedReproduced with a simulated model or mock
Description
Summary
The built-in browser skill stays advertised and loadable when the browser action is denied, and also when the skill itself is denied with { "action": "skill", "resource": "browser", "effect": "deny" }. Agents load it, call the denied in-app browser tools, and then stop: the skill says "never retry a denied permission another way", so they won't fall back to another browser tool that's allowed, such as a browser-automation MCP server.
Environment
- opencode version: server
0.0.0-dev-1330(dev), CLIv2.2.0 - OS: Darwin 27.2.0 arm64
- Terminal: Unavailable: not set in the agent's environment
- Shell: /bin/zsh
- Install/channel: dev
- Active plugins: several, list omitted; not yet tested without them. Config has
"experimental": { "all_flags": true }.
Reproduction
- In the global
opencode.jsonc, deny the in-app browser and its skill:"permissions": [ { "action": "browser", "resource": "*", "effect": "deny" }, { "action": "skill", "resource": "browser", "effect": "deny" }, ]
- Confirm the agent's resolved permissions include both rules (
GET /api/agent/<id>lists them). - Start a session and look at the available skills list in the system prompt.
- Call the skill tool with
{ "id": "browser" }.
Expected Behavior
- The
browserskill isn't listed and can't be loaded. The Skills docs say askilldeny "hides matching skills from the model and rejects loading". - Ideally the built-in
browserskill is also hidden whenever thebrowseraction is denied for the agent, since it only describes tools the agent can't use.
Actual Behavior
browseris still in the available skills list, with the description "Use the in-app browser… Load it before your first browser tool call."- The skill tool loads its full body without error.
- In practice, when a user asks an agent to use "my browser tools", the agent loads this skill, calls
tools.browser.tabs.list, and gets[browser.denied] Browser tools are denied for this agent by configuration; no action ran. Do not retry browser tools.It then refuses to continue. The skill's "never retry a denied permission another way" line, together with "Do not retry browser tools", makes it treat any other browser tool as off limits, even an allowed and connected MCP browser server.
Reproduced consistently: by an unattended agent across two days, and by loading the skill directly in a separate session.
Additional Context
- Workaround: shadow the built-in skill with a global
~/.config/opencode/skills/browser/SKILL.mdthat points agents at the allowed tool. User skills take precedence over built-in ones, and this works. - Possibly related: codemode: browser tools still listed in system prompt despite global "browser" deny permission #64369 (denied browser tools still listed in Code Mode) and agents: browser tools exposed despite agent-level "deny browser" when the agent has execute #54044 (browser tools exposed despite an agent-level deny).
- Possibly separate: after removing the
skilldeny rule from the global config,GET /api/agent/<id>kept reporting it, while the skills list did pick up the change.
Metadata
Metadata
Assignees
Labels
status/repro-simulatedReproduced with a simulated model or mock
Activity
opencodejr commentedon Nov 23, 2026
Seen with a simulated model or a mock server, not a real provider; a maintainer should confirm.
Thanks for the detailed report. I reproduced this on 2.2.0, and it still happens on the latest
dev(571619bc).What I did: I used your config (the two deny rules plus
experimental.all_flags), with a simulated model and an imitated desktop attachment.GET /api/agent/buildlists both deny rules.experimental.browser/attachplugin RPC for the session.[{"action":"browser","resource":"*","effect":"allow"},{"action":"skill","resource":"browser","effect":"allow"}].browserskill's description, and askillcall with{ "id": "browser" }returns its full body.So the explicit
skill: browserdeny is overridden only in attached sessions. That goes against the Skills docs, which saydeny"Hides matching skills from the model and rejects loading". In the plugin source, the browser permission hook re-applies the agent's own denies only tobrowsercalls, not toskill: browser, which fits what I saw.On your second point: a source comment in the browser plugin says an attachment lists the browser tools and their skill to every agent of an attached session, including one whose own rules deny the browser. Showing the skill when only
browseris denied therefore looks intended for now, so changing that would be a design change.I did not look into the stale
GET /api/agent/<id>rules after removing the deny.The script below reproduces it (
NO_ATTACH=1runs the control), and the screenshot and recording show the skill loading without error in the attached session.recording.mp4
Reproduction script (drive.ts)
Run it with opencode-drive:
opencode-drive run ./drive.ts. It drivesopencodefrom yourPATH; setOC_DEVto the path of an OpenCode checkout to run that from source instead.ccclucky commentedon Nov 23, 2026
Thanks for the detailed report. The mechanism is in
packages/plugin-browser/src/connection.ts: the attachment'sskill: browsergrant is a session rule that core evaluates after every agent rule, and the plugin'spermission.evaluatehook re-applies configured denies only tobrowsercalls. So in an attached session an explicitskill: browserdeny is overridden andskill({ id: "browser" })loads.I have a fix ready that extends that hook: when the evaluated action is
skillon the browser skill's id, the agent's configured rules are re-applied the same way, so a denied skill's load is refused instead of relying on the grant. Denies of other skills, and abrowser-only deny, are unaffected, and listing keeps following the attachment's documented "lists both to every agent" behavior.Verified locally:
packages/plugin-browsertests pass (189), including eight newpermission.evaluatecases; reverting the hook change fails the three new deny cases;bun typecheckandtscare clean. I will open a PR shortly.