/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
- Have a directory with spaces in the name (e.g.,
Test Folder) - Type
/add-dirin Claude Code - Drag the folder from Finder into the terminal
- Press Enter
- 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_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗