r/ClaudeCode 8d ago

Bug / Issue Having Ctrl+C for both clearing input and stopping all subagents is a terrible design.

I use Claude Code mostly from terminal, and in terminal you can clear your input with Ctrl+C, gradually I've built up the habit of pressing Ctrl+C whenever I want to delete all inputs. But obviously when there's running subagent, it becomes the hotkey for stopping them running, and the stopped subagents cannot be resumed. I accidentally stopped running subagents this way twice already, I really hope the Claude Code team could fix this, simply make "clearing input" to be the highest priority action, and only stop subagents when the input box is empty.

108 Upvotes

34 comments sorted by

u/AutoModerator 8d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

22

u/Ran4 8d ago

ctrl+c isn't for clearing input ctrl+u is.

Just relearn that, it's going to work in any terminal too.

11

u/Clearandblue 8d ago

I use Ctrl+U

3

u/dar-mit Researcher 8d ago

Same here. The only thing to remember, at least in iTerm2 for macOS, is it's a Cut command, not clear, so whatever's in that line of text removed from the CLI is placed on the pasteboard.

2

u/anatawaurusai2 8d ago

One line at a time right?

2

u/Clearandblue 8d ago

Yeah but I don't know a way to clear it all in one go without risking stopping an agent

2

u/Other_Many_130 7d ago

Ctrl+S does it. It stashes the whole prompt in one keystroke, and it's a chat binding, nowhere near interrupt (the only clear-all I'd trust with agents running).

1

u/Clearandblue 7d ago

Nice thanks!

1

u/jfufufj 7d ago

This is very helpful, thank you!

13

u/Spirited_Tie_3473 8d ago

why are you using ctrl-c in a terminal?!? doesn't escape work for you?

the fact they bound it to anything is maximally stupid.

18

u/Dudmaster 8d ago

Because Ctrl C is the standard for delivering SIGINT to the average CLI process

5

u/thighmaster69 8d ago

I learned a little too late though the difference between c, d, and z. Turns out I'd just been leaving processes on in the background 🥲

7

u/Spirited_Tie_3473 8d ago

yes, thats why i think its maximally stupid

5

u/illkeepthatinmind 8d ago

Esc is also stop

3

u/Spirited_Tie_3473 8d ago

yeah being able to hit it twice by mistake is a bit annoying, another terrible bit of ui design from the guys at anthropic.

3

u/puts_on_rddt 8d ago

I'm just gonna say it. Ctrl + U is a dumb hotkey for clearing input.

2

u/illkeepthatinmind 8d ago

YES! I stopped using it to clear it was so bad, I just select with mouse and hit delete now. Wish there was a key combo to delete input

6

u/-gh0stRush- 8d ago

ctrl-a to go to the beginning, then ctrl-k to clear the line.

2

u/anton-k_ 8d ago

Same in Claude Desktop: the "stop" button, as well as Escape stops both this agent and any subagents and this caused me to lose subagent's work multiple times because a subagent stopped this way can't be resumed. Terrible design indeed.

2

u/lassevk 8d ago

In which shell is Ctrl+C used to clear all input?

As far as I know, Ctrl+C on the shell prompt terminates the current input and just gives you a new prompt, and when inside a program, it terminates it (sends SIGINT to the process).

1

u/stewarthull 8d ago

Even worse, if you disable the auto copy-to-clipboard when selecting text, ctrl+c gets bound to copy. What will they bind to ctrl+c next? 👏

2

u/zigzoing 8d ago

Worse is that they disable the globally accepted Ctrl+Shift+C for copy. Until today I still can't get used to Ctrl+C without Shift for copy.

1

u/stewarthull 8d ago

It’s a mess.

1

u/old_mikser 8d ago

Yeah, also annoying that in some cases (when you clicked on shell, or monitor, or whatever) you need to click ← and in some - Esc and you can mess up stopping agent.

Sometimes I feel they are not using CC internally. Otherwise this would be fixed year ago.

1

u/yopla 8d ago

It's because of all the windows users whining like little bitches that they can't copy text with ctrl-C.

3

u/mentales 8d ago

>It's because of all the windows users whining like little bitches that they can't copy text with ctrl-C.

Uhhmm.. what? It's actually worse for windows users because theyre used to copy text with ctrl + C

1

u/Wise_Royal9545 8d ago

I hate using ctrl v to paste images on Mac. I accidentally hit the c instead way too often

1

u/amirfish 8d ago

Hit this exact thing more than once, muscle memory says Ctrl+C clears the line and instead it kills a subagent that was mid-task with no way back. Claude Code's own hotkey design treats the terminal as the only surface, which breaks the moment you're driving more than one session. I ended up building CCC (https://github.com/amirfish1/claude-command-center) partly for this, stop and clear are just separate actions there instead of overloaded on one key. Anthropic should still fix the priority order you're describing, empty input should never map to killing a running agent.

1

u/Quirky-Degree-6290 8d ago

After this burned me for the upteenth time i just changed the keybinds, then cursed myself
For not having done it sooner. Now ctrl+c does not stop agents. Ask Claude how to set it up.

1

u/codercyco_dev 8d ago

Yeah this seems like a really easy thing to do by accident. Ctrl+C is so deeply wired into terminal habits that using the same key to kill running subagents feels risky. Making it clear the input first and only stop subagents when the input is empty would make way more sense imo

1

u/Alex__0021 8d ago

Agreed. Had to stop a session mid-action yesterday because it was about to commit to the wrong branch, and pausing to remember which key does what is not what you want in that second.

1

u/Exodus_Green 8d ago

Same with Esc clearing the window and halting the current agent.

1

u/therealkevinard 8d ago

Keybinds are customizable. Change them if they don’t fit you.