You'll noticeTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
ArtifactsArea: what it touches
ImprovementsKind: in v2.1.265,
ImprovementsSection of the release
What
New helper functions resolve and validate a per-session "scratchpad" directory: they check that it's a real directory (not a symlink), compute its canonical path, detect whether a given path lies inside the scratchpad or the working directory, and detect symlink-redirect situations when resolving a base path.
When verifying the source of a file being published as an Artifact, the list of trusted root locations now also includes this scratchpad directory, in addition to the working directory and any additional working directories.
Why
This gives Claude Code a dedicated, verified scratch location per session, and lets files published from it be treated as trustworthy the same way files from the working directory already are.
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.
Added sinceA small documentation edit on Hooks reference touched a line naming scratchpad after this was published.| `scratchpad_dir` | Path to the session's [scratchpad directory](/docs/en/claude-directory#session-scratchpad-directory), where Claude keeps temporary working files. Absent when the session has no scratchpad or the temp directory is unava…hookssee the edit
Confirmed sinceAnthropic's documentation has since written up scratchpad, on Claude Code changelog.* Fixed Artifact updates failing with "File not found" after a session resumes on another machine or its scratchpad is cleared: the page's last published version is restoredchangelogsee 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 scratchpad, on Claude Code changelog.