[BUG] Desktop file pane does not open scratchpad files when CLAUDE_CODE_TMPDIR is set

Status Open
Reported on v2.1.295
Maintainer reply None cached
Activity 0 comments · opened Oct 15, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code (latest desktop app 2.37337.1, which bundles Claude Code 2.1.295. npm has 2.1.300.)

What's Wrong?

When CLAUDE_CODE_TMPDIR is set, Claude Code writes the session scratchpad under that root. The file pane of the Claude desktop app does not open files there. It shows "Couldn't find this file", but the file exists on disk.

A copy of the same file at the default path, /tmp/claude-501/<project>/<session-id>/scratchpad/, opens. A symlink at the default path that points to the real file does not open.

As a result, every scratchpad link that Claude gives in the chat does not open.

What Should Happen?

The file pane opens scratchpad files at the path that Claude Code uses, also when CLAUDE_CODE_TMPDIR moves the scratchpad. The file pane already opens them at the default path.

Error Messages/Logs

For the file under CLAUDE_CODE_TMPDIR:

Couldn't find this file
It may have been deleted, or it lives outside the working directory.

For the symlink at the default path:

Couldn't find this file
It was a temporary file, and your computer clears those from time to time. Ask Claude to create it again.

Steps to Reproduce

  1. In ~/.claude/settings.json, set "env": {"CLAUDE_CODE_TMPDIR": "/Users/<user>/.claude/tmp"}.
  2. In the Claude desktop app, start a local session in the Code tab.
  3. Ask Claude to write a file in its scratchpad and to give a link to the file.
  4. Click the link. The file pane shows "Couldn't find this file". The file exists at ~/.claude/tmp/claude-501/<project>/<session-id>/scratchpad/.
  5. Copy the file to /tmp/claude-501/<project>/<session-id>/scratchpad/.
  6. Ask Claude for a link to the copy, and click it. The file pane opens the file.

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

claude --version: 2.1.295 (Claude Code). Claude desktop app: 2.37337.1.

Platform

Anthropic API

Operating System

macOS 27.0.1

Terminal/Shell

Other: Claude desktop app, Code tab

Additional Information

  • Add folder in the file pane works, but only for one session.
  • additionalDirectories in ~/.claude/settings.json does not make the file pane open a folder.
  • The only workaround that lasts is to copy each file to the default path.
  • I searched the existing issues for CLAUDE_CODE_TMPDIR, "scratchpad" and "file pane". I found no report of this.

View original on GitHub ↗