New permissions config types not expressive enough in SDK #5894

Closed
opened 2026-02-16 17:58:03 -05:00 by yindo · 0 comments
Owner

Originally created by @brandonwisnicki on GitHub (Jan 14, 2026).

Originally assigned to: @thdxr on GitHub.

Description

The permissions config in the Typescript SDK doesn't seem to be at parity with the deprecated tools field.

Current types

    permission?: {
        edit?: "ask" | "allow" | "deny";
        bash?: ("ask" | "allow" | "deny") | {
            [key: string]: "ask" | "allow" | "deny";
        };
        webfetch?: "ask" | "allow" | "deny";
        doom_loop?: "ask" | "allow" | "deny";
        external_directory?: "ask" | "allow" | "deny";
    };
    tools?: {
        [key: string]: boolean;
    };
  • Custom tools do not seem to be available for permission setting
  • Built in tools such as skill or question are not available.

I might be missing something here, but seems like the fix is just allowing arbitrary string keys in this object. Thank you!

Plugins

No response

OpenCode version

1.1.20

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @brandonwisnicki on GitHub (Jan 14, 2026). Originally assigned to: @thdxr on GitHub. ### Description The `permissions` config in the Typescript SDK doesn't seem to be at parity with the deprecated `tools` field. Current types ```ts permission?: { edit?: "ask" | "allow" | "deny"; bash?: ("ask" | "allow" | "deny") | { [key: string]: "ask" | "allow" | "deny"; }; webfetch?: "ask" | "allow" | "deny"; doom_loop?: "ask" | "allow" | "deny"; external_directory?: "ask" | "allow" | "deny"; }; tools?: { [key: string]: boolean; }; ``` - Custom tools do not seem to be available for permission setting - Built in tools such as `skill` or `question` are not available. I might be missing something here, but seems like the fix is just allowing arbitrary string keys in this object. Thank you! ### Plugins _No response_ ### OpenCode version 1.1.20 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 17:58:03 -05:00
yindo closed this issue 2026-02-16 17:58:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5894