Repository navigation
Default agent TMPDIR to private sandbox storage - #11833
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 19, 2026 16:59
Contributor
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 0a6f7ae |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the change that defaults Compose agents’ TMPDIR to private /tmp.
No open issues 🎉
What changed in this PR
This PR addresses #11824 by defaulting Compose agents’ TMPDIR to private /tmp, avoiding failures caused by inherited host paths that are unwritable inside the sandbox.
Changes:
- Skip host
TMPDIRduring--env-allforwarding and apply/tmpas the default after explicit overrides. - Add regression tests for defaults, nested work directories, and explicit override precedence.
- Document custom-path requirements while preserving host-side temporary-file behavior and existing isolation.
| File | Description |
|---|---|
src/services/agent-environment/environment-builder.ts |
Default unset agent TMPDIR to /tmp. |
src/services/agent-environment/env-passthrough.ts |
Exclude inherited TMPDIR from host environment forwarding. |
src/services/agent-environment-options.test.ts |
Cover defaults, host-path exclusion, isolation settings, and explicit overrides. |
docs/environment.md |
Explain sandbox defaults and requirements for custom temporary directories. |
Review effort: Balanced (adaptive)
This was referenced Nov 20, 2026
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--env-allcan forward a hostTMPDIRthat becomes unwritable inside the chroot, causing temp-file creation to fail withEACCES. Nested work-directory masks can trigger this by creating root-owned parent directories.TMPDIRand default to private/tmpafter explicit environment values are merged.--env-fileand--envchoices; document that custom paths must be writable inside the sandbox.TMPDIRbehavior, existing mounts, and secret masks.