Unexpected behavior in scrolling through command lines

Resolved 💬 1 comment Opened Oct 6, 2025 by lyu-oai Closed Oct 15, 2025

What version of Codex is running?

codex-cli 0.44.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

Suppose our history is

command1
command2
command3

I then

  • press <up> twice to get to command2.
  • I then DELETE the entire line, whether through ctrl-c or simply backspace
  • press <up> again

What is the expected behavior?

In bash / zsh / every shell I have used, the logic is

  • "if you try to navigate (up/down arrow keys) after deleting the whole line, you should restart from the end (or beginning, depending on how you view it)"
  • "if the line is not empty at the time of navigation, then continue up/down the history chain"

So following typical command line behavior, this should switch me back to command3.

What do you see instead?

The current behavior replaces the line with command1

Additional information

Currently I think the only way to get back to the start is holding <down> until we hit the start, or just deleting everything to write over.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗