You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
WindowsArea: what it touches
ImprovementsKind: in v2.1.281,
ImprovementsSection of the release
What
TMPDIR is the environment variable that tells programs where to put temporary files. When a shell command mentions it, Claude Code sets up a separate temporary directory for that command. Before, this happened only when sandboxing was on. Sandboxing is Claude Code's feature for limiting what commands can touch. It now also happens on Windows.
Why
On Windows, commands that rely on TMPDIR now get a temporary folder set up for them, even without sandboxing.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up TMPDIR, on Error reference.On macOS and Linux, Claude Code creates a private temp directory at startup, `claude-<uid>` under the system temp directory or the [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars) override. When the directory can't be created, or an entry already…errorssee the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up TMPDIR, on Error reference.