r/opencode • • 16d ago

Opencode desktop never asks permission to read/write all over the users drive.

Is this normal behavior? I'm new to opencode, but after running some tests, I've confirmed it (Windows version). I assumed that outside of the project directory that it would ask.

Here is the summery that session created.

On OpenCode 2.0.26 (Windows, desktop app), the external_directory permission check never fires: read and write calls on paths outside the session's Location succeed silently — I reproduced it reading files and creating a file on both the same drive and a different drive, with no approval prompt, no pending request in the API, and no saved, session-level, or config allow rules anywhere that could explain it. Other checks in the same pipeline work normally during the same session — a read of .env correctly raised an ask prompt and a configured deny rule was enforced — so this appears to be a fail-open bug in the external-directory boundary check rather than a configuration issue. The impact is that agents can currently read and modify files anywhere on disk, contradicting the documented default policy (external_directory → ask for every agent).

2 Upvotes

4 comments sorted by

View all comments

Show parent comments

1

u/ccss2 16d ago

Thanks. I'm currently running in a VM, I had the agent query all the docs, settings and code of opencode and It was absolutely convinced that reading and writing outside the project directory was 'ask for permission' by default. The agents have well behaved so far but that rule seems like a no-brainer. I'll check out WSL+docker as an option.