TMPDIR
A Claude Code environment variable, read out of the shipped bundle. It has been in the build since v2.1.160, including the newest one read.
Working-tree upload now refuses linked worktrees and checkouts sitting in temporary scratch directories.
Not Anthropic's. This is the line from the earliest changelog entry here that named it, v2.1.247.
In the changelogs
14Releases whose published page names TMPDIR.
-
v2.1.304
The sandbox has an extra rule for which environment variables get through
The filter deciding which environment variables reach sandboxed commands now has an extra condition
found in this entry's text
-
v2.1.300
Sandbox protects per-tenant folders in multi-tenant setups
In a multi-tenant mode, the sandbox uses per-tenant folders and blocks writes to .claude and resume files inside them
found in this entry's text
-
v2.1.287
Remotely served project hooks pick a private temp folder more strictly
Project hooks served remotely now use a temp folder only if it lies outside what the session can write, and log a specific error if none does
found in this entry's text
-
v2.1.281
Commands that reference TMPDIR get a Claude temp dir on Windows too
On Windows, shell commands that mention TMPDIR now get their own Claude temp directory, as they already did with sandboxing on
found in this entry's text, named in this entry
-
v2.1.281
Sandboxed bash on macOS/Linux now exports TMPDIR to the sandbox temp dir
Sandboxed commands on macOS and Linux now get
TMPDIRpointed at the sandbox's own temporary folderfound in this entry's text, named in this entry
-
v2.1.281
Host-credential cache key includes APPDATA and LOCALAPPDATA
The host-credential cache now resets when APPDATA or LOCALAPPDATA change, as well as its earlier inputs
found in this entry's text
-
v2.1.281
Bash rm check now flags rm targets built from variables that may be empty (tengu_bright_lake, falls back to on)
The Bash
rmcheck now follows shell variables and asks for approval when an empty one could make a path reach/found in this entry's text
-
v2.1.277
Sandboxed shell commands get a $TMPDIR backstop when referenced but unset
Sandboxed shell commands get a fallback TMPDIR value when the command text references it but none is set
found in this entry's text, named in this entry
-
v2.1.277
Sandbox/bash env gains a TMPDIR backstop
Sandboxed shell commands can now get a TMPDIR fallback if it isn't already set
found in this entry's text, named in this entry
-
v2.1.251
Eval sandboxes run with claude.ai MCP servers off
Eval sandboxes force claude.ai MCP servers off so they can't reach real servers.
found in this entry's text
-
v2.1.248
Denylist of shell startup variables added
A list names shell variables that can hijack a startup, with no visible consumer.
found in this entry's text
-
v2.1.247
Working-tree upload refuses linked worktrees and scratch-space checkouts
Working-tree upload now refuses linked worktrees and checkouts sitting in temporary scratch directories.
found in this entry's text
-
v2.1.163
$TMPDIR Sandbox Documentation Clarified
found in this entry's text
-
v1.0.125
macOS Temp Folder Sandbox Support
found in this entry's text
First cited
0No release's published evidence quotes this name. The ledger indexes the Evidence lines of every changelog on this site, so this says nobody here has ever quoted it; it says nothing about how old the name is.
Presence across releases
1Build by build
129One row per release since the first build this name was read out of. Absent means the build was read and the name was not in it, never mined means no bundle for that release was ever archived, and a declared type or a default is only ever what that release's own bundle stated.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the environment variable does. All environment variables.