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
Allow writes to /tmp by default without permission prompt #5386
Currently opencode prompts for permission when the model writes to /tmp. Models frequently use /tmp for temporary files during tasks, and requiring approval adds friction without meaningful security benefit since /tmp is ephemeral and outside the user's project.
Writes to /tmp (and $TMPDIR) should be allowed by default.
Still an issue as of v1.2.21 (Mar 2026).
My use case: a multi-agent writes a shared payload file to /tmp/ so that subagents can read it (avoids repeating large context inline). Subagents with "read": "allow" silently fail to read files under /tmp/ because external_directory defaults to "ask" — and subagents never surface the permission prompt.
Workaround: explicitly setting "external_directory": { "/tmp/**": "allow" } per subagent in opencode.json. Works, but verbose.
+1 for a first-class $TMPDIR //tmp allow option — or at minimum, making external_directory: "ask" actually prompt for subagents instead of silently blocking.
Activity
rekram1-node commentedon Dec 11, 2025
Yeah agree, lets allow it
remorses commentedon Dec 11, 2025
I can open a PR if you want
rekram1-node commentedon Dec 11, 2025
yeah ill merge it
afk rn but when i get back ill look
feat: allow writes to /tmp by default without permission prompt
remorses commentedon Jan 24, 2026
Clsoing. Now you can pass in opencode.json
diegonix commentedon Mar 8, 2026
Still an issue as of v1.2.21 (Mar 2026).
My use case: a multi-agent writes a shared payload file to /tmp/ so that subagents can read it (avoids repeating large context inline). Subagents with "read": "allow" silently fail to read files under /tmp/ because external_directory defaults to "ask" — and subagents never surface the permission prompt.
Workaround: explicitly setting
"external_directory": { "/tmp/**": "allow" }per subagent in opencode.json. Works, but verbose.+1 for a first-class
$TMPDIR //tmpallow option — or at minimum, making external_directory: "ask" actually prompt for subagents instead of silently blocking.djtuBIG-MaliceX commentedon Sep 3, 2026
Also it's $TEMP or %TEMP% in some platforms. should be
env:$TEMP/**