[BUG] Compact Auto-Unstashes and Overwrites New Prompt
Resolved 💬 1 comment Opened Apr 13, 2026 by Smail Closed May 25, 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?
If you run compact after stashing a prompt, once the command completes it automatically restores the stashed prompt, overwriting the new one.
- Stash prompt
- Run
/compact - Unstash prompt to continue typing
/compactfinishes- My prompt gets overwritten with the previous content of the stash ie the initial message
What Should Happen?
/compactshould not overwrite my prompt automatically after it's done
Error Messages/Logs
Steps to Reproduce
> Hello Claude please fi- Me thinking: "Let me run compact first to save time"
- Stash the message
> /compact- Unstash the message
> Hello Claude please fix my super cool new featu- ... compact done, unstashes automatically even though nothing should be on stash
> Hello Claude please fi
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.104 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗