[BUG] unable to remove a dir added with /add-dir

Resolved 💬 3 comments Opened Mar 31, 2026 by libgrover Closed May 5, 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 i use /add-dir, it adds a new directory into scope but there's no available path to delete that scoped directory.

What Should Happen?

/add-dir should delete an entry if its already been provided or a /del-dir command should be added to delete the directory from scope.

Error Messages/Logs

❯ /add-dir
  ⎿  Added /Users as a working directory for this session · /permissions to manage

❯ how do i remove a dir i added with /add-dir

⏺ Use /add-dir again — it toggles. Run it and select the directory you want to remove from the list.

  Alternatively, the added directory only persists for this session. Starting a new conversation will reset it.

❯ /add-dir /Users
  ⎿  /Users is already accessible within the existing working directory /Users.

❯ that is not true ❯ /add-dir /Users
  ⎿  /Users is already accessible within the existing working directory /Users.

⏺ That looks like a bug — it's telling you /Users is already within /Users because you added it, but it won't let you remove it with the same command.

  Your best option: just start a new conversation. The /add-dir additions are session-scoped and won't persist.

  If you want to report this, you can file it at https://github.com/anthropics/claude-code/issues.

Steps to Reproduce

add a directory using /add-dir and try to delete it

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.87

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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