Repository navigation
fix: turn off Codex native web search by default - #3272
Merged
Merged
Conversation
Codex sends its built-in `web_search` tool with every request unless its config says otherwise. Self-hosted providers do not serve it: Dynamo 1.5.1 dropped it silently, and Dynamo 1.6.1 (now in CI) refuses the request, which fails every codex integration test. The harness now writes Codex's `web_search` setting, "disabled" unless the config asks for "cached" or "live". The web_search_interception example needs a provider with native web search, so CI skips it; its README shows how to turn web search on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Codex native web search becomes opt-in, avoiding unsupported-tool requests to self-hosted providers. The change is limited to per-rollout configuration, retains explicit search enablement, and includes focused configuration tests and documentation. You can add or adjust custom eligibility rules. Learn more. |
mikasenghaas
commented
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
web_search: "disabled" | "cached" | "live"toCodexHarnessConfig. The default is"disabled".config.tomlas Codex's ownweb_searchsetting.web_search_interceptionexample in CI. It needs a provider that serves native web search, and the CI model does not.config.toml.Codex sends its built-in
web_searchtool with every request unless its config says otherwise (Codex's default iscached). Self-hosted providers do not serve this tool. Dynamo 1.5.1 dropped the tool silently. Dynamo 1.6.1, which CI now uses, refuses the request. Thus every Codex rollout in CI fails.Breaking
web_searchon the harness config, for example--env.agent.harness.web-search live(orcached).Verification
I sent requests directly to the CI endpoint (Dynamo 1.6.1):
tools=[{"type": "web_search"}], the request fails:Unsupported Responses tools type 'web_search': the Chat Completions adapter supports only function tools.web_searchtool, the request succeeds.Before: I reran CI on
main(run 45484443174). Eleven integration tests failed. All of them are Codex tests, or theweb_search_interceptionexample. Every failed rollout shows the 400 error above, for example intest_user_echo.py::test_user[codex-in-prime]and intest_skills.py::test_skills[codex-in-prime].After: the integration tests on this PR pass.
tests/unit/harnesses/test_codex_web_search.pypasses locally.🤖 Generated with Claude Code
Note
Medium Risk
Changes default Codex rollout behavior (breaking for anyone relying on implicit native search); mitigated by an explicit opt-in flag and targeted CI skip.
Overview
Codex native web search is now off by default via a new
web_searchharness setting (disabled|cached|live) that is written into Codex'sconfig.toml, fixing CI rollouts that failed when self-hosted providers (e.g. Dynamo 1.6.1) reject the Responsesweb_searchtool.To keep native search, opt in with e.g.
--env.agent.harness.web-search live. The web_search_interception example is skipped in integration CI and its README documents that flag. A unit test asserts the default and explicitlivevalues land inconfig.toml.Reviewed by Cursor Bugbot for commit 3c6b4b4. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Disable Codex native web search by default
Adds a
web_searchoption toCodexHarnessConfigin harness.py, acceptingdisabled,cached, orlive, withdisabledas the default.build_envnow writes this mode into the generated Codexconfig.toml. Covered by a unit test that checks the written value for the default andlivecases.web_search_interceptionexample is added to theSKIP_EVALintegration skip list because the CI model does not serve native web search; its README documents how to enable live search viavf-runweb_search = "disabled"inconfig.tomlunless the config setsweb_searchexplicitlyMacroscope summarized 3c6b4b4.