Press Up Arrow to Recall and Edit Your Previous Prompts
You sent a prompt that was 90% right but missed one detail. Instead of retyping the whole thing, press up arrow to bring it back, edit the part that needs changing, and send.
# Press Up Arrow to recall your last prompt
# Press Up Arrow again to go further back
# Edit the text, then press Enter to send
This is the same prompt history you know from your shell, applied to Claude Code. Your recent prompts are all there — just arrow up to find the one you want.
Common uses:
# Refine a prompt that almost worked
"Add validation to the user form" # first attempt
# Up Arrow, edit:
"Add validation to the user form using Form Requests, not inline"
# Retry with different parameters
"Review src/auth/ for security issues"
# Up Arrow, edit:
"Review src/payments/ for security issues"
# Repeat a command after making manual changes
"Run the tests"
# ... make some edits manually ...
# Up Arrow to run tests again
# Fix a typo without retyping
"Refactor the UserContoller to use dependency injection"
# Up Arrow, fix "Contoller" -> "Controller"
This pairs well with other shortcuts:
- Up Arrow — recall previous prompts
- Down Arrow — move forward through history
- Ctrl+C — clear the current input and start fresh
- Shift+Tab — toggle plan/act mode before resending
For prompts you use constantly, save them as custom commands instead of relying on history:
# If you keep pressing up arrow to find the same prompt,
# it's time to make it a slash command in .claude/commands/
The best prompt is often a small edit of your last one — up arrow makes iterating on prompts as fast as iterating on code.
via Claude Code
Log in to leave a comment.
When typing feels slow — describing a complex bug, explaining architecture, or thinking through a problem out loud — press Option+V to switch to voice input. Speak naturally and Claude Code transcribes your words into a prompt, so you can describe what you need at the speed of thought.
When Claude is heading down the wrong path — editing the wrong file, writing code you don't want, or giving a long explanation you don't need — press Escape to stop it immediately. You keep everything it did up to that point and can redirect with a new prompt.
Closed a session and realized you weren't done? Pass --continue (or -c) when launching Claude Code to pick up exactly where you left off — same context, same files, same conversation history — without re-explaining what you were working on.