You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tools.web_search cannot be disabled when using reasoning_effort = minimal resulting in a failure #5002
When launching Codex CLI v0.46.0 with reasoning_effort = minimal, the client still sends web_search tool in the request, resulting in a 400 Bad Request error. The flag tools.web_search=false (or equivalents) is ignored, so it’s impossible to run Codex in minimal mode offline.
Expected behavior
• The request should be accepted.
• web_search should be disabled (or omitted) in the request payload.
• Codex should operate with minimal reasoning and no web access.
Actual behavior ⚠️ stream error: unexpected status 400 Bad Request: {
"error": {
"message": "The following tools cannot be used with reasoning.effort 'minimal': web_search.",
"type": "invalid_request_error",
"param": "tools",
"code": null
}
}
What is the expected behavior?
web search shall be disabled in such scenario to avoid faiilure
What do you see instead?
⚠️ stream error: unexpected status 400 Bad Request: {
"error": {
"message": "The following tools cannot be used with reasoning.effort 'minimal': web_search.",
"type": "invalid_request_error",
"param": "tools",
"code": null
}
}
Additional information
The problem is happening even when web search is diabled in config.toml :
Activity
Fixes #5002
agileandy commentedon Oct 20, 2025
this is happening with codex all the time for me...
• Model changed to gpt-5-codex with low reasoning
› hi
■ unexpected status 400 Bad Request: {"success":false,"error":{"issues":[{"code":"invalid_union_discriminator","options":
["function","web_search_preview","web_search_preview_2025_03_11","web_search","web_search_2025_08_26"],"path":["tools",5,"type"],"message":"Invalid discriminator value.
Expected 'function' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search' | 'web_search_2025_08_26'"}],"name":"ZodError"}}
• Model changed to gpt-5-codex with high reasoning
› what does this do?
■ unexpected status 400 Bad Request: {"success":false,"error":{"issues":[{"code":"invalid_union_discriminator","options":
["function","web_search_preview","web_search_preview_2025_03_11","web_search","web_search_2025_08_26"],"path":["tools",5,"type"],"message":"Invalid discriminator value.
Expected 'function' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search' | 'web_search_2025_08_26'"}],"name":"ZodError"}}
Merge pull request #5 from 4way4eva/nornagon/codex/fix-web_search-too…
etraut-openai commentedon Jan 10, 2026
Closing old issue.
Fixes openai#5002
feat: add disallowed_tools deny-list across all adapters