Skip to content

[BUG] Free models fail when shell or read permissions are denied #51241

Description

@Otagamo

Description

Free models fail when shell or read permissions are denied

Description

Using OpenCode v2.0.16 with OpenCode free models such as opencode/big-pickle.

If either the shell or read permission is set to deny, requests to free models fail with:

Error: OpenCode's free tier can only be used from within OpenCode

For example:

{
  "action": "shell",
  "resource": "*",
  "effect": "deny"
},
{
  "action": "read",
  "resource": "*",
  "effect": "deny"
}

Changing both permissions to allow immediately makes the error disappear:

{
  "action": "shell",
  "resource": "*",
  "effect": "allow"
},
{
  "action": "read",
  "resource": "*",
  "effect": "allow"
}

The behavior can be reproduced without restarting OpenCode: changing these permissions while OpenCode is running changes whether the next request succeeds or fails.

Expected behavior

Tool permissions should control whether the model can use those tools.

Denying shell or read should not cause a request made from the official OpenCode CLI to be identified as coming from outside OpenCode.

Actual behavior

Disabling these tools causes OpenCode free-tier requests to be rejected as if the request were not originating from OpenCode.

Environment

  • OpenCode: v2.0.16

Plugins

Reproduced with the official CLI. The behavior is permission-dependent.

OpenCode version

2.0.16

Steps to reproduce

  1. Run OpenCode v2.0.16.
  2. Select a free OpenCode model, for example opencode/big-pickle.
  3. Set shell or read to deny.
  4. Start a new session or send a simple prompt such as Hello.
  5. The request fails with:
Error: OpenCode's free tier can only be used from within OpenCode
  1. Change both shell and read to allow.
  2. Send the same prompt again.
  3. The request succeeds.

Screenshot and/or share link

No response

Operating System

Windows 11 25H2 26200.9457

Terminal

PowerShell 7.6.6.0-x64

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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