Skip to content

webfetch permission with object syntax crashes server on startup #29041

Closed as not planned

Description

@ballsop

Description

Using the object/pattern syntax for the webfetch permission in opencode.jsonc causes the server to crash on startup with "Unexpected server error" for config.providers, provider.list, app.agents, and config.get. I had been looking to see if I could provide a curated list of URLs (domains) that would be allowed while requiring a prompt for everything else.

Config that crashes (even with just a wildcard):

{
  "permission": {
    "webfetch": {
      "*": "ask"
    }
  }
}

Simple string value works fine:

{
  "permission": {
    "webfetch": "ask"
  }
}

The permissions docs state:

For most permissions, you can use an object to apply different actions based
on the tool input.

and show object syntax examples for bash and edit. It is unclear whether webfetch is expected to support object syntax or not. If it is, this is a bug;
if not, the docs should clarify which permissions support pattern matching.

Plugins

none

OpenCode version

1.15.10

Steps to reproduce

  1. Add "webfetch": { "*": "ask" } to the permission section of
    opencode.jsonc

  2. Run opencode

  3. Observe:

    Error: 4 of 5 requests failed: Unexpected server error. Check server logs for details.
    Affected startup requests: config.providers, provider.list, app.agents, config.get
     at vO (B:/~BUN/root/chunk-dk74dn3y.js:470:117)
     at <anonymous> (B:/~BUN/root/chunk-dk74dn3y.js:470:5550)
     at processTicksAndRejections (native:7:39)
    

Expected: Server starts normally and prompts on webfetch calls for URLs matching the patterns, OR docs explicitly state object syntax is not supported for this permission.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. github-actions commented on May 23, 2026

    @github-actions
    Contributor

    This issue might be related to existing issues. Please check:

    Your report is distinct in that you're observing a server crash rather than a config validation error, which may indicate a regression or a separate code path worth investigating.

  2. github-actions commented on Jul 23, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions