From 1370d5d405bd5cf1fd23ecb9aaecba60ab020c33 Mon Sep 17 00:00:00 2001 From: Jacques Paye Date: Wed, 7 Jan 2026 15:37:22 -0800 Subject: [PATCH 1/2] reuse TMPDIR if it's set instead of hardcoding /tmp/claude --- src/sandbox/sandbox-utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sandbox/sandbox-utils.ts b/src/sandbox/sandbox-utils.ts index 8a5b080..781d6e8 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 existing TMPDIR if set, otherwise default to /tmp/claude + const tmpdir = process.env.TMPDIR || '/tmp/claude' + const envVars: string[] = [`SANDBOX_RUNTIME=1`, `TMPDIR=${tmpdir}`] // If no proxy ports provided, return minimal env vars if (!httpProxyPort && !socksProxyPort) { From 7ddf03cc123ce88abd542bc2475e5c85939f9173 Mon Sep 17 00:00:00 2001 From: Jacques Paye Date: Thu, 8 Jan 2026 12:03:54 -0800 Subject: [PATCH 2/2] switch to CLAUDE_TMPDIR --- package-lock.json | 2 +- package.json | 2 +- src/sandbox/sandbox-utils.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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 781d6e8..6c2d2cc 100644 --- a/src/sandbox/sandbox-utils.ts +++ b/src/sandbox/sandbox-utils.ts @@ -298,8 +298,8 @@ export function generateProxyEnvVars( httpProxyPort?: number, socksProxyPort?: number, ): string[] { - // Respect existing TMPDIR if set, otherwise default to /tmp/claude - const tmpdir = process.env.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