[Bug] /add-dir does not strip surrounding quotes from path argument

Status Open
Reported on v2.1.226
Maintainer reply None cached
Activity 1 comment · opened Aug 10, 2026

Bug Description
Title: /add-dir does not strip surrounding quotes from its path argument

Environment

  • Claude Code 2.1.226
  • Windows 11 Pro 10.0.26200, PowerShell

Description

/add-dir treats surrounding quote characters as part of the path. Quoting a path is normal habit from the terminal, so this is easy to hit, and the resulting error message does not point at the real cause.

Steps to reproduce

  1. Start Claude Code in any working director\project.
  2. Make sure C:\Git\some-folder exists.
  3. Run: /add-dir "C:\Git\some-folder"

Actual result

Path C:\Users\me\Documents\project\"C:\Git\s

The leading " makes the argument look like ained with the current working directory. Thedirectory is never added.

Expected result

The directory is added, the same as when the command is run without quotes. Leading and trailing " or ' should be stripped before the path is resolved.

Secondary issue

The error message technically contains the cwith the quote characters in the middle – but it reads as "this directory does not exist". Two things would help:

  • report the argument as the user typed it, and say that it was resolved relative to the working directory because it

is not an absolute path,

  • or detect the quote characters and say so explicitly.

Workaround

Run the command without quotes: /add-dir C:\Git\some-folder. Paths containing spaces then have no way to be quoted, which is the other half of the problem.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.226
  • Feedback ID: 43e0b90c-b3a1-4a4c-b535-d00a56f768ba

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗