Where Claude Code saves screenshots and images

Updated 8 October 2026 · for the Claude Code command line (version 2.1.294) on macOS

Claude Code makes more images than it shows you. Screenshots, charts, rendered pages and PDFs land in folders outside your project, and the terminal prints a path or a text placeholder instead of the picture. This page lists where each kind goes and how to open it. It covers the terminal version; the Desktop app, the VS Code extension and the mobile app behave differently.

The short answer

  1. Where does Claude Code save screenshots?
  2. Where do pasted images go?
  3. Where do Claude in Chrome screenshots go?
  4. How do I view an image in the terminal?
  5. Why did my files disappear?
  6. How do I recover an image from a transcript?
  7. Where are Artifacts?
  8. How current is this guide?
  9. Collecting them automatically

Where does Claude Code save screenshots and generated images?

When Claude Code writes a file for its own use, such as a screenshot of a page it just built, a chart or a PDF, it puts it in a scratchpad folder for that session:

/private/tmp/claude-501/<project>/<session-id>/scratchpad/

The number after claude- is your macOS user id (501 for the first account on most Macs; id -u prints yours). <project> is the folder Claude Code was started in, with every character that is not a letter or a digit turned into a dash, so /Users/sam/my code/shop_v2 becomes -Users-sam-my-code-shop-v2. Names over 200 characters are cut short and given a hash. Each session gets its own id.

To list the newest files across every session:

find /private/tmp/claude-$(id -u) \( -name '*.png' -o -name '*.jpg' \) -mmin -120

Change -mmin -120 to look further back, or swap the patterns for *.pdf or *.html.

Not every setup has a scratchpad. Anthropic's documentation says it exists only for a session signed in with a claude.ai account, on Anthropic's own API (not Amazon Bedrock, Google's or Microsoft's platforms), with the enableArtifact setting not switched off. Without it, look at the path in the file-writing tool call in the conversation. If you set CLAUDE_CODE_TMPDIR, the whole tree lives under that folder instead of /private/tmp.

Where do images I paste into Claude Code go?

An image you paste or drag into the prompt is saved next to the scratchpad, in the same session folder:

/private/tmp/claude-501/<project>/<session-id>/images/

Each file is named after its [Image #N] number in the conversation, so a session can hold 5.png and 6.png and no 1.png, and the extension follows the image type. According to Anthropic's documentation, Cmd+click on an [Image #N] reference in the prompt opens the picture in your default viewer, in terminals that support links.

Where do Claude in Chrome screenshots go?

Claude in Chrome takes screenshots all the time, but it writes a file only when it saves one to disk (Claude Code 2.1.211 and later, according to Anthropic's Chrome documentation). A saved screenshot goes into a temporary folder in your $TMPDIR named claude-chrome-screenshots- followed by random characters, as a file such as screenshot-<number>-<n>.jpg; the extension follows the image type. That naming comes from inspecting the Claude Code program, not from documentation, so treat it as likely rather than guaranteed.

open "$TMPDIR"

That opens the folder in Finder. If there is no claude-chrome-screenshots- folder, nothing was saved to disk, which is normal: a screenshot Claude looked at lives in the conversation, and the session transcript has it if it was returned as an image (see below).

How do I view an image Claude Code makes, in the terminal?

Claude Code reads an image file so that the model can see it, but its documentation describes no inline display of the picture in the terminal. You see a path, a size or a text placeholder such as [Image]. An issue opened in July 2026 on Claude Code's GitHub tracker, still open on 8 October, reports the placeholder even in Kitty, Ghostty and iTerm2. Recent builds also contain code for terminals that speak the Kitty graphics protocol, which Anthropic hasn't announced, so images may appear inline for you in Kitty or Ghostty. If they do, skip this section. Claude Code Desktop shows images in its own window.

What works everywhere is opening the file from your Mac. From any other terminal tab:

open /path/to/shot.png          # in Preview
qlmanage -p /path/to/shot.png   # Quick Look
open -R /path/to/shot.png       # show it in Finder instead

Inside Claude Code, a line that starts with ! runs as a shell command without asking Claude first, for example ! open /path/to/shot.png. The command and its output are added to the conversation, so Claude sees them too. Or ask Claude to run open on the file it just made.

Why did my screenshots and files disappear?

Two cleanups can remove them. Claude Code deletes a session's transcript, scratchpad and images/ folder together once the session is older than cleanupPeriodDays, which is 30 days unless you change it in your settings. That is the most likely reason an old image is gone, and raising the number keeps them longer.

macOS also treats everything under /private/tmp and $TMPDIR as temporary. On the Mac this guide was tested on, /private/tmp is cleaned daily of files untouched for about three days, and $TMPDIR is cleaned daily and emptied at restart. Apple doesn't document those timings as a promise, so they can change. Anthropic says only that the system can clear the folder, for example on restart.

Claude Code keeps no index of what it put there, so once a file is gone nothing says it existed. If you want an image, copy it somewhere else while it is there:

cp /private/tmp/claude-501/<project>/<session-id>/scratchpad/shot.png ~/Desktop/

How do I recover an image from a session transcript?

Claude Code writes every session to a JSON Lines file, one JSON object per line:

~/.claude/projects/<project>/<session-id>.jsonl

Images that were returned to the conversation, such as pasted pictures, screenshots from Chrome and image files Claude read, are stored inside it as base64 text. Large images can be stored at a reduced size, and an image Claude wrote but never read is not in it. This pulls out the last one, using jq (recent macOS includes it; on an older one, brew install jq):

f=$(ls -t ~/.claude/projects/*/*.jsonl | head -1)
jq -r '.. | objects | select(.type? == "image") | .source.data? // empty' "$f" | tail -1 | base64 -D > recovered.img
file recovered.img

file says whether it is a PNG or a JPEG, so you can rename it. Use head -1 in place of tail -1 for the first image, or drop that part to get every one on its own line. Transcripts can reach tens of megabytes, so give jq a moment. Anthropic describes the transcript format as internal, so a future release may change it, and this transcript is cleaned up with the rest of the session (see above).

Where are Claude Code Artifacts saved?

An Artifact is a page Claude publishes to claude.ai from a file. Two things exist: the file Claude passed to the Artifact tool, which is usually in a temporary folder outside your project, often the scratchpad, and the published page at https://claude.ai/code/artifact/<id>.

To find a page again, run /artifacts in Claude Code. It lists every Artifact you own or were sent, in any session, and it can open or copy the link. Ctrl+] reopens the newest one from this session, and the same list is at claude.ai/code/artifacts. If you need to dig a link out of an old transcript:

grep -ohE 'https://claude.ai/code/artifact/[0-9a-f-]{36}' ~/.claude/projects/*/*.jsonl | sort -u

That prints every such link in every session, one per line. It only finds links that appeared as text in the conversation.

How current is this guide?

Checked against Claude Code 2.1.294 on macOS on 8 October 2026. Anthropic can move these folders or change the transcript format in any release, and its documentation says the transcript format is internal. If something here doesn't match what you see, run claude --version, compare it with 2.1.294, check Anthropic's documentation at code.claude.com/docs, or write to [email protected] and we'll update this page.

Collecting them automatically

Everything above works, but it is slow when Claude has made a dozen images across three sessions. We built Detego for that: a Mac app that reads these same folders and transcripts and keeps what it finds in one shelf under your notch, grouped by session and prompt. It never takes focus from the terminal, and it copies each image out of the temporary folder so it is still there after a cleanup.

Detego is paid, with a 14-day free trial and no account to create. Download the free trial for macOS 14 or later, or see how it works. Detego works with Claude Code and isn't affiliated with Anthropic.