Skip to content

tools.web_search cannot be disabled when using reasoning_effort = minimal resulting in a failure #5002

@MiCkSoftware

Description

@MiCkSoftware

What version of Codex is running?

v0.46.0

Which model were you using?

gpt-5

What platform is your computer?

macos

What steps can reproduce the bug?

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.

Steps to reproduce

codex -m "gpt-5" \
  --config model_reasoning_effort=minimal \
  --config tools.web_search=false \
  --sandbox read-only \
  --ask-for-approval never -- "hello"

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 :

[tools]
web_search = false

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions