You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
permissions: external read outside project never prompts in TUI prompt mode #55207
In v2.0.28 with default config and TUI session.permissions: prompt, agent reads of files outside the project (e.g. /etc/hosts, ~/.ssh/id_rsa) succeed silently — no external_directory prompt, no queue entries, no saved approvals. Includes sensitive paths: SSH private key readable with zero prompts.
Empty project dir (tested both non-git and git inited) with empty global ~/.config/opencode/opencode.jsonc ($schema only) and no project config.
TUI → Ctrl+P → Open settings → permissions = prompt (confirmed persisted as session.permissions: "prompt" in cli.json).
In a session there, have the agent read /etc/hosts (also tried ~/.ssh/id_rsa, files under ~/.config).
Observe: content returned, no prompt in TUI.
Verify: GET /api/session/<id>/permission → {"data":[]}; GET /api/permission/saved → {"data":[]}; permission table 0 rows; no permission lines in opencode.log.
Expected Behavior
Per docs/permissions, a path outside the Location/worktree needs external_directory approval (default ask) before its read approval — TUI should prompt (once / always / reject).
Actual Behavior
Read succeeds silently. Consistently reproducible (~15 external reads, two sessions incl. fresh fork; sudo cat /etc/shadow and sudo ls /root also silent).
Additional Context
Prompt delivery works: reading a *.env file inside the project DID prompt. Defect is specific to the external_directory gate, not prompt UI.
Thanks for the thorough report and the checks you ran.
I think this is a duplicate of #54524. In v2.0.25, #53585 removed the built-in external_directory → ask rule on purpose. The default ruleset is now * → allow plus the *.env read prompts, so paths outside the project are read without a prompt. You can see this in your report: external reads are silent, .env reads still prompt, and nothing appears in the permission queue. The permissions docs were never updated and still list the old default, which is why this looks like a bug. #54524 is tracking the docs mismatch, the missing release note and requests to bring the old default back.
Until that's settled, this config rule brings the prompts back. It covers reads, writes and other access outside the project:
Closing this as a duplicate of #54524, since there's been no reply in the past day explaining how it's different. The silent reads outside the project come from the default change in 2.0.25 (#53585), which removed the built-in external_directory → ask rule. Please follow #54524 for the docs fix and the discussion about bringing that default back.
Until then, adding this rule to your config brings the prompts back:
Activity
opencode-agent commentedon Oct 13, 2026
Thanks for the thorough report and the checks you ran.
I think this is a duplicate of #54524. In v2.0.25, #53585 removed the built-in
external_directory → askrule on purpose. The default ruleset is now* → allowplus the*.envread prompts, so paths outside the project are read without a prompt. You can see this in your report: external reads are silent,.envreads still prompt, and nothing appears in the permission queue. The permissions docs were never updated and still list the old default, which is why this looks like a bug. #54524 is tracking the docs mismatch, the missing release note and requests to bring the old default back.Until that's settled, this config rule brings the prompts back. It covers reads, writes and other access outside the project:
{ "permissions": [ { "action": "external_directory", "resource": "*", "effect": "ask" } ] }Possible duplicates and related issues, ordered by likelihood:
external_directory) #55070: the docs still sayexternal_directorydefaults toask, but the code doesn't (already marked as a duplicate of permissions: built-in external_directory ask never prompts, identical explicit rule does #54524)external_directorydefault couldn't be overriddenexternal_directory: "deny"is bypassed by thebashtool (macOS) #54465: shell commands getting aroundexternal_directoryrulesThe bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencode-agent commentedon Oct 14, 2026
Closing this as a duplicate of #54524, since there's been no reply in the past day explaining how it's different. The silent reads outside the project come from the default change in 2.0.25 (#53585), which removed the built-in
external_directory → askrule. Please follow #54524 for the docs fix and the discussion about bringing that default back.Until then, adding this rule to your config brings the prompts back:
{ "permissions": [ { "action": "external_directory", "resource": "*", "effect": "ask" } ] }If you still don't get prompts with this rule, please reply here and we can reopen. Thanks again for the detailed report.