Desktop app: dragging a folder into a session attaches it as a reference instead of setting the working directory (commands run in $HOME)

Open 💬 0 comments Opened Jun 21, 2026 by cybertourssedona-stack

Environment

  • Claude Code desktop app on macOS (Darwin 25.5.0)

Summary

When starting a new session, dragging a project folder from the Desktop into the session/message area attaches the folder as a reference (like an @-mention) rather than setting the session's working directory. The working directory stays at $HOME, so terminal commands run in the wrong place.

Steps to reproduce

  1. Open the desktop app and start a new session.
  2. Drag a project folder (e.g. ~/Desktop/my-repo) from the Desktop into the session/message area.
  3. Type a prompt that runs a shell command (e.g. ask it to run pwd, or pnpm build).

Expected

Shell commands (pnpm, git, node, …) run inside the dragged project folder.

Actual

  • The dragged folder is treated as an attached reference, not the working directory.
  • pwd returns the home folder (/Users/<me>), not the project folder.
  • Every repo command must be manually prefixed with cd <repo> && …; bare commands fail (no workspace found) or scan the home folder.

What does work

Setting the folder via the "+" / folder picker when creating the session correctly sets the working directory (confirmed — pwd then returns the project path). So the issue is specific to the drag-into-session gesture.

Impact

The drag gesture looks like it sets the project directory but doesn't, and it recurs every session until you learn to use the "+" picker instead. It's easy to misread as a broken environment rather than a UI gap.

Suggested fix

Either:

  • (a) make dragging a folder into a new session set that session's working directory (match the "+" picker behavior), or
  • (b) visually distinguish "folder as working directory" from "folder as an attached reference," so it's clear which one the drag is doing.

View original on GitHub ↗