claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Feature Request: Recover un-submitted prompt accidentally cleared

Open andrewleech opened this issue 6 months ago • 1 comments

Feature Request When a prompt being typed is cleared with ctrl-c it would help to have an "undo" to bring it back.

Background All too often I'm typing up a detailed prompt and a few parapgraphs in I go to paste in a filename reference or similar with crtl-v and my fingers hit ctrl-c instead. It doesn't help that I'm often jumping between desktop and laptop and phone and laptop-with-keyboard-via-dock so muscle memory gets thwarted. Every time I have this accidental ctrl-c and lose a big chunk of planning I remind myself "I should always draft larger prompts in a notes app first...." but when multi-tasking a bunch of claude's this doesn't always happen.

If I could hit ctrl-z or similar after a ctrl-c clearing to bring it back again this would be hugely appreciated!

Thanks :-D

andrewleech avatar Jun 19 '25 01:06 andrewleech

Oh man, I would love this. I've accidently erased giant prompts I've written sooo many times, and it's the absolute worst feeling in the world.

I try to remember to write them in a notepad or something now, but I don't always remember, and managing across the different apps is pretty sloppy. My PC ends up with 30 notepad files open at some point.

nullbio avatar Jun 19 '25 10:06 nullbio

Implemented as of v1.0.33

dicksontsai avatar Jun 26 '25 05:06 dicksontsai

Legend!

nullbio avatar Jun 26 '25 16:06 nullbio

I have v 1.0.69 and it's still the issue! Accidentally hitting CTRL-C cleanups the prompt without any chance to restore that CTRL-Z - now sends it to background, CTRL-U doesn't restore

OS: Kubuntu 24.10 KDE Plasma: 6.1.5 VSCode: 1.102.1 Claude Code: 1.0.69

Please reopen the issue

usulpro avatar Aug 06 '25 09:08 usulpro

@usulpro Use Ctrl+-

dicksontsai avatar Aug 06 '25 16:08 dicksontsai

It's actually Ctrl+_ (https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md?plain=1#L133)

mrjogo avatar Aug 06 '25 17:08 mrjogo

You're (dare I say, absolutely) right! I'm just used to Ctrl+- working on my Mac.

dicksontsai avatar Aug 06 '25 17:08 dicksontsai

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 15 '25 14:08 github-actions[bot]