Merge pull request #84 from anthropic-experimental/jacques/respect-tmpdir-in-srt

Reuse `process.env.TMPDIR` if set
This commit is contained in:
ollie-anthropic
2026-01-08 20:07:04 +00:00
committed by GitHub
3 changed files with 5 additions and 3 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@anthropic-ai/sandbox-runtime",
"version": "0.0.25",
"version": "0.0.26",
"lockfileVersion": 3,
"requires": true,
"packages": {

View File

@@ -1,6 +1,6 @@
{
"name": "@anthropic-ai/sandbox-runtime",
"version": "0.0.25",
"version": "0.0.26",
"description": "Anthropic Sandbox Runtime (ASRT) - A general-purpose tool for wrapping security boundaries around arbitrary processes",
"type": "module",
"main": "./dist/index.js",

View File

@@ -298,7 +298,9 @@ export function generateProxyEnvVars(
httpProxyPort?: number,
socksProxyPort?: number,
): string[] {
const envVars: string[] = [`SANDBOX_RUNTIME=1`, `TMPDIR=/tmp/claude`]
// Respect CLAUDE_TMPDIR if set, otherwise default to /tmp/claude
const tmpdir = process.env.CLAUDE_TMPDIR || '/tmp/claude'
const envVars: string[] = [`SANDBOX_RUNTIME=1`, `TMPDIR=${tmpdir}`]
// If no proxy ports provided, return minimal env vars
if (!httpProxyPort && !socksProxyPort) {