Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Documented default permission doesn't match the one in the code (no default restriction for `external_directory`)

Closed Beginner friendly
#55,070 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
documentation

Research direction

Start with the default permissions in packages/schema/src/agent.ts at the linked line, then compare them with the permissions documented at the linked defaults page. Check whether the external_directory ask rule is absent elsewhere in the source. Done when the documented default and the code agree on that rule.

Written by the indexing model from the issue text.

Description

pending close triaging
Description

Hello,

As documented here, default permission should be:

[
  { "action": "*", "resource": "*", "effect": "allow" },
  { "action": "external_directory", "resource": "*", "effect": "ask" },
  { "action": "read", "resource": "*.env", "effect": "ask" },
  { "action": "read", "resource": "*.env.*", "effect": "ask" },
  { "action": "read", "resource": "*.env.example", "effect": "allow" },
]

But in the source code (AFAIK):

          permissions: [
            { action: "*", resource: "*", effect: "allow" },
            { action: "read", resource: "*.env", effect: "ask" },
            { action: "read", resource: "*.env.*", effect: "ask" },
            { action: "read", resource: "*.env.example", effect: "allow" },
          ],

https://github.com/anomalyco/opencode/blob/80fb31ebb7e8dfa5c26fc51ca81da8e06b618a52/packages/schema/src/agent.ts#L46

The { "action": "external_directory", "resource": "*", "effect": "ask" } is missing.
(and it doesn't seems to be add in the code somewhere else).

Regards

Plugins

No response

OpenCode version

80fb31ebb7e8dfa5c26fc51ca81da8e06b618a52

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Dominant language
TypeScript
Stars
213k
Forks
28.4k
Avg merge
8h 32m
Merged PRs (30d)
253

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anomalyco/opencode

All issues in anomalyco/opencode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.