/add-dir doesn't handle backslash-escaped spaces from terminal drag-and-drop

Resolved 💬 5 comments Opened Jan 6, 2026 by chrsmys Closed Feb 20, 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

What's Wrong?

When dragging a file or folder into the terminal, macOS automatically escapes spaces with backslashes (e.g., Test\ Folder). The /add-dir command doesn't recognize these escaped paths and does not remove the escaping when passed in.

What Should Happen?

Claude recognizes a dragged in file and removes escape characters if escaping is unnecessary.

Error Messages/Logs

Steps to Reproduce

  1. Have a directory with spaces in the name (e.g., Test Folder)
  2. Type /add-dir in Claude Code
  3. Drag the folder from Finder into the terminal
  4. Press Enter
  5. File not found error.

Input:

/add-dir /Users/nschris/Desktop/Test\ Folder

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗