Bash mode history

Resolved 💬 3 comments Opened Apr 26, 2026 by tom-huntington Closed Apr 27, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI

What feature would you like to see?

Once in bash mode, I would like to be able to press up on by keyboard to get recent commands.

I would like the history of previous commands, to persist even after starting a new session /new

P.S. Maybe should should rename it shell mode for windows powershell users.

Additional information

_No response_

View original on GitHub ↗

3 Comments

etraut-openai contributor · 4 months ago

Thanks for the suggestion. I agree on both accounts — this should be called "Shell mode", and these commands should be saved into the global history buffer.

etraut-openai contributor · 4 months ago

This will be addressed in the next release.

tom-huntington · 4 months ago

Thanks! This will be appreciated.

You asked my thoughts in https://github.com/openai/codex/issues/17515

-----

Codex TUI should be more explicitly modal (i.e. vim/kakoune/helix) imo.

If you are writing your prompt (insert mode), you can press escape to enter normal mode, from where you can enter shell mode with ! or command mode with /

You have a list of buffers (either prompts or shell mode commands) that you can edit/rerun and reorder. At the moment, you can only build a request in the form user_shell_command* user_message.

In normal mode, you can change which of the buffers is focused.

----

The current UX where ! and / from a empty prompt, send you into their respective modes is good. You could preserve this happy path, while adding more advanced functionality.