Tab completion after `!` shell prefix in Codex CLI

Resolved 💬 4 comments Opened Jan 22, 2026 by weakfl Closed Mar 29, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.88.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.2-codex

What platform is your computer?

Darwin 25.2.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Ghostty (zsh, ohmyzsh, starship)

What issue are you seeing?

No tab completion after ! shell prefix in Codex CLI

What steps can reproduce the bug?

  1. Start Codex CLI interactive session.
  2. Type !cat R and press <TAB>.

What is the expected behavior?

Shell-style completion for files/commands (e.g., expands to !cat README.md).

Additional information

Expected:
Shell-style completion for files/commands (e.g., expands to !cat README.md).

Actual:
<TAB> does nothing; no completion is triggered in ! mode.

View original on GitHub ↗

4 Comments

PanandSu · 7 months ago

I couldn't agree more.

etraut-openai contributor · 7 months ago

Codex is working as designed here, so we wouldn't consider this a bug. Providing arbitrary shell completions is not implemented for !. That's normally the job of the underlying shell. Reimplementing this in Codex (across all different shells) would be a tall order.

I've changed this from a bug report to an enhancement request, and we can see whether it receives upvotes.

rogerchucker · 6 months ago

Yes, this does not work in Claude Code either. Having said that, this reduces the quality of user experience by limiting the ! mode to very simple shell commands and arg combinations which users can recall and don't mind typing them out. I would not be surprised if most people (like myself), use it for pwdand ls.

At that point, you might as well stop offering this mode in the codex CLI and just expose these simple shell command as actual slash command (i.e. /pwd, /ls). Because, once a user has to venture out of the shell where the codex CLI is running in order to copy paste, say, a very complicated command and its args from somewhere else, they might as well execute the command in a different shell session.

etraut-openai contributor · 5 months ago

This feature request hasn't received enough upvotes, so I'm closing it.