diff --git a/package-lock.json b/package-lock.json index c7c7dcf..d55a41a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@anthropic-ai/sandbox-runtime", - "version": "0.0.25", + "version": "0.0.26", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index c0b15b6..adbe5f0 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/sandbox/sandbox-utils.ts b/src/sandbox/sandbox-utils.ts index 8a5b080..6c2d2cc 100644 --- a/src/sandbox/sandbox-utils.ts +++ b/src/sandbox/sandbox-utils.ts @@ -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) {