Unexpected argument '--search' found
Resolved 💬 3 comments Opened Sep 8, 2025 by elopez3 Closed Sep 8, 2025
💡 Likely answer: A maintainer (lionelchg, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.16.0
Which model were you using?
gpt-5 high reasoning effort
What platform is your computer?
Darwin 24.2.0 arm64 arm
What steps can reproduce the bug?
I type codex --search in my terminal and is outputting this error:
error: unexpected argument '--search' found
tip: to pass '--search' as a value, use '-- --search'
Usage: codex-aarch64-apple-darwin [OPTIONS] [PROMPT]
codex-aarch64-apple-darwin [OPTIONS] [PROMPT] <COMMAND>
For more information, try '--help'.
What is the expected behavior?
For codex --search to work and not error.
What do you see instead?
error: unexpected argument '--search' found
tip: to pass '--search' as a value, use '-- --search'
Usage: codex-aarch64-apple-darwin [OPTIONS] [PROMPT]
codex-aarch64-apple-darwin [OPTIONS] [PROMPT] <COMMAND>
For more information, try '--help'.
Additional information
_No response_
3 Comments
I believe your codex-cli version is too old as
web_searchhas been introduced fully only 2 weeks ago in v0.26.0: https://github.com/openai/codex/releases/tag/rust-v0.26.0You need to update codex-cli. Thanks @lionelchg
@aibrahim-oai I'm still getting the unexpected
--searcherror in codex 0.117.0, despite the option listed incodex --help:I'm using codex via my ChatGPT Pro account.