GeezerVison is showing github.com — Allow writes to /tmp by default without permission prompt · Issue #5386 · anomalyco/opencode
Allow writes to /tmp by default without permission prompt #5386DescriptionCurrently 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.
Related: #4743 Reacted by Pete Cornish and Vlad Ionescu Activityrekram1-node commented on Dec 11, 2025 Yeah agree, lets allow it remorses commented on Dec 11, 2025 ContributorAuthor More actions I can open a PR if you want rekram1-node commented on Dec 11, 2025 yeah ill merge it
afk rn but when i get back ill look added a commit that references this issue on Dec 12, 2025This issue will close once commit ea53b55 is merged into the 'dev' branch.ea53b55 remorses commented on Jan 24, 2026 ContributorAuthor More actions Clsoing. Now you can pass in opencode.json
"permission": {
"edit": "allow",
"bash": "allow",
"external_directory": {
"*": "ask",
"/tmp": "allow",
"/tmp/*": "allow",
"/private/tmp": "allow",
"/private/tmp/*": "allow",
"env:$TMPDIR": "allow",
"env:$TMPDIR/*": "allow"
},
},
Reacted by Ernesto Cruz Olivera, Denis, tomshaffner, Adi and Pete Cornish Reacted by Colin Mollenhour, Pat Riehecky, Denis, Doug Richardson, tomshaffner and Adi diegonix commented on 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 / /tmp allow option — or at minimum, making external_directory: "ask" actually prompt for subagents instead of silently blocking. Reacted by Ben Hansen and Rex Ng djtuBIG-MaliceX commented on Sep 3, 2026 Also it's $TEMP or %TEMP% in some platforms. should be env:$TEMP/**
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|