-
-
Notifications
You must be signed in to change notification settings - Fork 932
Description
Project Version
9.8.2
Bug Description
The fix for #338 (which replaced --search with --enable web_search_request) has the same underlying problem: the --enable flag is a top-level codex flag, not a
codex exec subcommand flag.
Error Message
error: unexpected argument '--enable' found
tip: to pass '--enable' as a value, use '-- --enable'
Usage: codex exec --json --dangerously-bypass-approvals-and-sandbox [PROMPT]
For more information, try '--help'.
Environment
- pal-mcp-server: latest (via uvx from git)
- codex-cli: 0.66.x
- OS: macOS
Root Cause
In conf/cli_clients/codex.json:
{
"additional_args": [
"--json",
"--dangerously-bypass-approvals-and-sandbox",
"--enable",
"web_search_request"
]
}
These args are appended to codex exec, producing:
codex exec --json --dangerously-bypass-approvals-and-sandbox --enable web_search_request "prompt"
But --enable is a top-level flag that must come before exec:
codex --enable web_search_request exec --json --dangerously-bypass-approvals-and-sandbox "prompt"
Workaround
Remove --enable and web_search_request from conf/cli_clients/codex.json:
{
"additional_args": [
"--json",
"--dangerously-bypass-approvals-and-sandbox"
]
}
Suggested Fix
Either:
- Add a pre_subcommand_args field to CLI configs for flags that must come before the subcommand
- Or remove --enable web_search_request from the default codex config since it's optional
Related
- 9.4.0 breaks clink codex codereview by passing unexpected --search arg #338 - Same issue pattern with --search flag
Relevant Log Output
Operating System
macOS
Sanity Checks
- I have searched the existing issues and this is not a duplicate.
- I am using
GEMINI_API_KEY - I am using
OPENAI_API_KEY - I am using
OPENROUTER_API_KEY - I am using
CUSTOM_API_URL