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
[FEATURE]: allow /tmp or $TMPDIR folder access option #4743
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Can we have an option to allow write access under /tmp or $TMPDIR to when they are outside of current project directory? Or we can also make the external_directory more extensible like the following
The environment variable BUN_TMPDIR might be what you're looking for. See this comment for reference: #4605 (comment).
Setting BUN_TMPDIR to a directory on a partition mounted with the exec option helped resolve my "Failed to initialize OpenTUI render library: Failed to open library" error. Although you didn't specify your exact use case, it should function similarly to TMPDIR.
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.
You could also try to add another entry like "{env:TMPDIR}/**": "allow", but I wouldn't do it... if that env variable is not set, it could have pretty unpleasant consequences in case it resolves to "/**".
just gave opencode a try..
at least, please, improve the error message.
$ opencode
Error: Unexpected error
An error occurred in Effect.tryPromise
this is the failure that happens.. without any error message anywhere or log.
mounting /tmp with noexec is hardening.. normies don't harden their systems..
Activity
github-actions commentedon Nov 25, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if this is specifically about the feature to configure /tmp access via config options.
jiyeol-lee-kds commentedon Nov 25, 2025
slightly similar request like #4667
rekram1-node commentedon Nov 25, 2025
Yeah we need better more granular permissions setup
camAtGitHub commentedon Nov 30, 2025
The environment variable
BUN_TMPDIRmight be what you're looking for. See this comment for reference: #4605 (comment).Setting
BUN_TMPDIRto a directory on a partition mounted with theexecoption helped resolve my "Failed to initialize OpenTUI render library: Failed to open library" error. Although you didn't specify your exact use case, it should function similarly toTMPDIR.Mattwmaster58 commentedon Feb 8, 2026
from my reading, it definitely seems like #5386 is the same as this, and that issue has been fixed
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.Nindaleth commentedon Mar 9, 2026
This is how I set this:
You could also try to add another entry like
"{env:TMPDIR}/**": "allow", but I wouldn't do it... if that env variable is not set, it could have pretty unpleasant consequences in case it resolves to"/**".GottZ commentedon Jun 16, 2026
just gave opencode a try..
at least, please, improve the error message.
this is the failure that happens.. without any error message anywhere or log.
mounting /tmp with noexec is hardening.. normies don't harden their systems..
I literally have this in my .zshrc now:
github-actions commentedon Aug 16, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.