[BUG] Arrow Down Doesn't Restore Original Prompt After Arrow Up
Status Closed — not planned
Maintainer reply None cached
Activity 8 comments · opened Oct 12, 2025 · closed Jan 11, 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?
When using command history navigation in Claude Code CLI, pressing Arrow Up replaces the current prompt with a previous command, but pressing Arrow Down does not return to the original unsent prompt. This results in loss of the user's typed text.
- Users cannot safely explore command history without losing their current work
- Violates standard terminal UX conventions (bash, zsh, fish all preserve current prompt)
- Forces users to avoid Arrow Up entirely or copy text before navigating history
What Should Happen?
Expected Behavior -> Standard CLI command history behavior:
- User types: "my original prompt"
- Press Arrow Up -> Shows previous command from history
- Press Arrow Down -> Should restore "my original prompt"
- Press Arrow Down again (at newest position) → Empty prompt or stay at current
Error Messages/Logs
n/a
Steps to Reproduce
- Open Claude Code CLI
- Type any text (don't press Enter)
- Press Arrow Up key
- Press Arrow Down key
- Observe that original text is not restored
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
n/a
Claude Code Version
2.0.14
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
Preserve the "current unsent prompt" as the newest entry in the history stack, allowing Arrow Down to return to it before it's submitted.
8 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
what if i can handle this
The other reports seem to be on a different platform.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Just ran into the same. Spent like 20 minutes refining a very long initial prompt with tons of details just to loose it because I was navigating to the beginning or end of the prompt with "arrow up/down" (forgot which exactly) and pressed it once too often... Very frustrating. Feels like back in the day when IDEs/text editors did not auto-save.
Solution: hit
ctrl + _(possibly a few times) to undo changes in the prompt field.Thanks to https://github.com/anthropics/claude-code/issues/2208#issuecomment-3295891040 !
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
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.