[BUG] Stash lost when running /add-dir
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 stash a prompt (Ctrl+S) to run a command (such as /output-style or /usage), I expect this prompt to come back after the command finishes. When I run /add-dir <path>, the stash does not come back, meaning I lost an important/long prompt. Instead, the same /add-dir command stays on my input.
This does NOT happen if you run /add-dir without any arguments. I think this happens because of the confirmation prompt that only shows when calling add-dir with the path in a single line
What Should Happen?
Claude Code should unstash my stashed prompt instead of displaying the /add-dir I just ran.
Error Messages/Logs
Steps to Reproduce
- Write a prompt and press Ctrl+S.
Stashed (auto-restores after submit)displays - Write
/add-dir <path>and press Enter - Press any option in the confirmation prompt
- Prompt stays as
/add-dir <path>, pressing Ctrl+S to unstash the prompt on step 1 instead stashes the /add-dir command
In the screen recording I show that unstashing works when running other slash commands (/usage) and when calling /add-dir (and choosing folder-2 interactively), but not when running /add-dir ../folder-3
https://github.com/user-attachments/assets/a1fd2935-13e6-4625-8366-d162c4f068af
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.15 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗