zsh completion for -p/--profile is missing dynamic profile discovery
Open 💬 1 comment Opened Mar 31, 2026 by sanyue-dev
What version of Codex CLI is running?
0.118.0
What subscription do you have?
API key
Which model were you using?
gpt-5.4
What platform is your computer?
Darwin 25.4.0 x86_64 i386
What terminal emulator and version are you using (if applicable)?
iTerm2 (zsh)
What issue are you seeing?
The zsh completion script generated by codex completion zsh does not provide suggestions for profiles defined in config.toml.
What steps can reproduce the bug?
- Define a profile in
~/.codex/config.toml:
``toml``
[profiles.my-profile]
model = "gpt-4o"
- Type
codex -pand press Tab.
What is the expected behavior?
Zsh should suggest the available profiles (e.g., my-profile) instead of falling back to default filename completion.
Additional information
Analysis shows the generated _codex script uses _default for the CONFIG_PROFILE argument:'-p+[Configuration profile from config.toml to specify default options]:CONFIG_PROFILE:_default'
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗