OpenCode bug: default external_directory 'ask' policy silently allows out-of-worktree writes

Gameman2012 · ghdev · 2026-10-11

Issue #54524 in anomalyco/opencode (v2.0.25, Linux) reports a permissions flaw: with pure default config (no permissions key), writes to paths outside the session location/worktree (e.g. /tmp from a /Desktop session) complete silently — no permission dialog appears, even though the built-in base policy resolves externaldirectory to ask.

Security-relevant for coding agents: the default 'ask' guarantee isn't actually enforced, letting agents write outside project boundaries under default configs.

Original post →

More from coding & agent

coding & agent channel →