Skip to content

chore: allow repo-local OpenCode permissions - #14433

Closed
Jinwoo-H wants to merge 2 commits into
mainfrom
chore-opencode-repo-permissions
Closed

Jinwoo-H wants to merge 2 commits into
mainfrom
chore-opencode-repo-permissions

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add repository-local opencode.json with allow-all permissions
  • allow exactly opencode.json through the existing new-root-entry guard
  • ensure every future worktree inherits the setting after this lands on main

Effective config

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "*": {
      "*": "allow"
    }
  }
}

Validation

  • jq -e '.permission["*"]["*"] == "allow"' opencode.json
  • opencode debug config | jq -e '.permission["*"]["*"] == "allow"'
  • root-directory guard regression: 11/11 passed
  • GitHub CI: 42 passed, 2 intentional skips, 0 failures
  • git diff --check

The root guard remains fail-closed for every other new root entry. This change is intentionally separate from STA-4231.

@nwparker

nwparker commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Thanks @Jinwoo-H. Your repository config and root-guard contribution is incorporated in merged #25326.

The adaptation allows ordinary actions while retaining confirmation for .env and .env.* reads and external directories. .env.example stays allowed; doom_loop is retained for legacy compatibility. The guard also preserves the existing cloud allowance.

Installed OpenCode 2.0.16 discovered the config and registered the ordered Build agent rules in isolated projects. That check verifies configuration and agent-rule discovery; it did not execute tools to test permission decisions.

Closing this PR as incorporated with that policy adaptation.

@nwparker nwparker closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants