Main agent often asking to access external_directory which is the one we are in (worktrees) #9188

Open
opened 2026-02-16 18:11:51 -05:00 by yindo · 4 comments
Owner

Originally created by @jacquesbh on GitHub (Feb 12, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Using the Desktop app, on macOS.

I've started a new workspace (git worktree) and I am running some sessions on it.

The main agent often ask for permission to access "external_dir" which is the directory of the worktree itself inside the ~/.opencode directory.

I always need to deny the permission and say You don't need to access external directory, everything you need is in the current dir. and it continues correctly.

Plugins

No response

OpenCode version

1.1.60, but it happens for a while now.

Steps to reproduce

Hard to do so, you need a new workspace and your agent needs to decide to use the external directory instead of current…
I use GPT 5.2 Codex xhigh most of the time.

Screenshot and/or share link

Image

Operating System

macOS Sequoia 15.7

Terminal

No response

Originally created by @jacquesbh on GitHub (Feb 12, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Using the Desktop app, on macOS. I've started a new workspace (git worktree) and I am running some sessions on it. The main agent often ask for permission to access "external_dir" which is the directory of the worktree itself inside the `~/.opencode` directory. I always need to deny the permission and say `You don't need to access external directory, everything you need is in the current dir.` and it continues correctly. ### Plugins _No response_ ### OpenCode version 1.1.60, but it happens for a while now. ### Steps to reproduce Hard to do so, you need a new workspace and your agent needs to decide to use the external directory instead of current… I use GPT 5.2 Codex xhigh most of the time. ### Screenshot and/or share link <img width="991" height="132" alt="Image" src="https://github.com/user-attachments/assets/66a2fe75-88db-4dae-b527-3274956d83be" /> ### Operating System macOS Sequoia 15.7 ### Terminal _No response_
yindo added the bugweb labels 2026-02-16 18:11:51 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 12, 2026):

This issue might be a duplicate of or related to existing issues. Please check:

  • #12699: "Access external directory" warning is ambiguous - discusses the unclear nature of external_directory permission prompts
  • #10643: Worktrees created from bare repos are not recognized - related worktree issue
  • #5395: Split external_directory permission into read vs write - related feature request about external_directory permissions

If this is a different concern, please clarify what distinguishes it from the above.

@github-actions[bot] commented on GitHub (Feb 12, 2026): This issue might be a duplicate of or related to existing issues. Please check: - #12699: "Access external directory" warning is ambiguous - discusses the unclear nature of external_directory permission prompts - #10643: Worktrees created from bare repos are not recognized - related worktree issue - #5395: Split external_directory permission into read vs write - related feature request about external_directory permissions If this is a different concern, please clarify what distinguishes it from the above.
Author
Owner

@rekram1-node commented on GitHub (Feb 12, 2026):

can u share opencode debug config

@rekram1-node commented on GitHub (Feb 12, 2026): can u share `opencode debug config`
Author
Owner

@jacquesbh commented on GitHub (Feb 13, 2026):

Hi, I've reviewed the config myself, I have some MCPs, some agents and sub-agents. Nothing fancy, no special configuration or anything.

The main agent was working when I had my issue (the Build one), for me the hint is on workspaces.

I can share the config after cleaning it if you really need but imho…

For me the agent knows it's in a workspace but somehow it "forgets". I didn't compact lately, using gpt 5.2.

@jacquesbh commented on GitHub (Feb 13, 2026): Hi, I've reviewed the config myself, I have some MCPs, some agents and sub-agents. Nothing fancy, no special configuration or anything. The main agent was working when I had my issue (the Build one), for me the hint is on workspaces. I can share the config after cleaning it if you really need but imho… For me the agent knows it's in a workspace but somehow it "forgets". I didn't compact lately, using gpt 5.2.
Author
Owner

@NachoFLizaur commented on GitHub (Feb 13, 2026):

Hi there! is oc requesting access for the workspace's own directory? or do you have different workspaces and it's trying to access the directory of one from another?

@NachoFLizaur commented on GitHub (Feb 13, 2026): Hi there! is oc requesting access for the workspace's own directory? or do you have different workspaces and it's trying to access the directory of one from another?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9188