What probably matters to youSection of the release
Unclear It is not stated what Claude Code puts in the scratchpad folder or when it uses it.
What
Claude Code now reads an environment variable, CLAUDE_CODE_SCRATCHPAD_DIR. An environment variable is a named value you set in your terminal before starting a program. It names a scratchpad folder, a working area for files tied to artifact work.
Claude Code accepts the value only when all of these are true:
The path is absolute, meaning it starts from the root of the drive.
The path is already in its simplest form, with no shortcuts such as ...
The last folder in the path is named .artifact-work.
The path passes some further checks.
If any check fails, Claude Code ignores the variable as if it were not set.
Why
This gives artifact work a scratch location you can choose from the environment. Because a wrong path is silently ignored, make sure the folder you point it at ends in .artifact-work.