codex - ✅(Solved) Fix Bash mode history [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19613Fetched 2026-04-26 05:13:54
View on GitHub
Comments
1
Participants
2
Timeline
10
Reactions
0
Timeline (top)
labeled ×5unlabeled ×3commented ×1cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #19618: Persist shell mode commands in prompt history

Description (problem / solution / changelog)

Why

! shell commands are currently surfaced as "Bash mode", which is misleading for users running shells such as PowerShell or zsh. Those commands also bypass the persistent prompt history path, so they cannot be recalled after starting a new session.

Fixes #19613.

What changed

  • Rename the TUI footer label and related test wording from "Bash mode" to "Shell mode".
  • Persist accepted ! shell commands to prompt history with the leading !, so recall restores the composer into shell mode across sessions.
  • Add coverage for immediate and queued shell-command submissions emitting the prompt-history update.

Verification

  • cargo test -p codex-tui bang_shell
  • cargo test -p codex-tui shell_command_uses_shell_accent_style
  • cargo test -p codex-tui footer_mode_snapshots
  • cargo insta pending-snapshots --manifest-path tui/Cargo.toml

Manually verified fix after confirming presence of bug prior to fix.

Changed files

  • codex-rs/tui/src/bottom_pane/chat_composer.rs (modified, +7/-7)
  • codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__footer_mode_shell_command_absorbs_bang.snap (modified, +1/-1)
  • codex-rs/tui/src/chatwidget.rs (modified, +19/-2)
  • codex-rs/tui/src/chatwidget/tests/exec_flow.rs (modified, +4/-0)
  • codex-rs/tui/src/chatwidget/tests/slash_commands.rs (modified, +8/-1)
RAW_BUFFERClick to expand / collapse

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

extent analysis

TL;DR

Implementing a feature to persist command history across sessions in bash mode is likely to require modifications to the Codex CLI.

Guidance

  • Investigate the current implementation of bash mode in Codex CLI to understand how command history is stored and retrieved.
  • Consider using a persistent storage mechanism, such as a file or database, to store command history across sessions.
  • Review the /new session initialization process to determine how to retain command history when starting a new session.
  • Evaluate the feasibility of renaming "bash mode" to "shell mode" for better compatibility with Windows PowerShell users.

Notes

The implementation details of the proposed feature are uncertain due to the lack of information about the current Codex CLI architecture.

Recommendation

Apply workaround: Implement a custom solution to store and retrieve command history, as the issue does not imply an existing fix in a newer version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - ✅(Solved) Fix Bash mode history [1 pull requests, 1 comments, 2 participants]