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

Up arrow navigation breaks upon reaching /clear command

Open ajwrigley opened this issue 6 months ago • 1 comments

Claude Code CLI, MacOS.

This is a very simple fix. When hitting 'Up' to cycle through history, as soon as you hit a /clear command, the up and down arrows no longer cycle through history but are permanently captured by the UI trying to disambiguate between /clear and /compact. It's impossible to escape from without manually backspacing the /clear command, or else hitting Ctrl-C.

Since /clear is such a common command, this effectively makes navigation through history impossible, meaning I'm authoring all prompts in my text editor, and then manually pasting them into Claude Code, every time.

Similar issues with Up navigation exist with pasted code, but the /clear one is the worst. It would be an insane productivity boost to have the history back again.

ajwrigley avatar Jun 18 '25 10:06 ajwrigley

#2193

sorryhyun avatar Jun 18 '25 11:06 sorryhyun

Fixed in v1.0.28 by @levpopov

dicksontsai avatar Jun 26 '25 04:06 dicksontsai

This seems to work for /clear (in v1.0.35) but not /exit

breathe67 avatar Jun 27 '25 00:06 breathe67

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 10 '25 14:08 github-actions[bot]