Skip to content

fix: turn off Codex native web search by default - #3272

Merged
mikasenghaas merged 1 commit into
mainfrom
fix/codex-web-search
Nov 24, 2026
Merged

mikasenghaas merged 1 commit into
mainfrom
fix/codex-web-search

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add web_search: "disabled" | "cached" | "live" to CodexHarnessConfig. The default is "disabled".
  • Write the value to Codex's config.toml as Codex's own web_search setting.
  • Skip the web_search_interception example in CI. It needs a provider that serves native web search, and the CI model does not.
  • Show in the example's README how to turn web search on.
  • Add a unit test for the default value and for an explicit value in config.toml.

Codex sends its built-in web_search tool with every request unless its config says otherwise (Codex's default is cached). 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

  • Codex rollouts no longer get native web search by default. To keep it, set web_search on the harness config, for example --env.agent.harness.web-search live (or cached).

Verification

I sent requests directly to the CI endpoint (Dynamo 1.6.1):

  • With tools=[{"type": "web_search"}], the request fails: Unsupported Responses tools type 'web_search': the Chat Completions adapter supports only function tools.
  • With the same request and no web_search tool, the request succeeds.

Before: I reran CI on main (run 45484443174). Eleven integration tests failed. All of them are Codex tests, or the web_search_interception example. Every failed rollout shows the 400 error above, for example in test_user_echo.py::test_user[codex-in-prime] and in test_skills.py::test_skills[codex-in-prime].

After: the integration tests on this PR pass.

tests/unit/harnesses/test_codex_web_search.py passes 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_search harness setting (disabled | cached | live) that is written into Codex's config.toml, fixing CI rollouts that failed when self-hosted providers (e.g. Dynamo 1.6.1) reject the Responses web_search tool.

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 explicit live values land in config.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_search option to CodexHarnessConfig in harness.py, accepting disabled, cached, or live, with disabled as the default. build_env now writes this mode into the generated Codex config.toml. Covered by a unit test that checks the written value for the default and live cases.

  • The web_search_interception example is added to the SKIP_EVAL integration skip list because the CI model does not serve native web search; its README documents how to enable live search via vf-run
  • Behavioral Change: existing Codex environments that previously had web search on now get web_search = "disabled" in config.toml unless the config sets web_search explicitly

Macroscope summarized 3c6b4b4.

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>
@macroscopeapp

macroscopeapp Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 3c6b4b4

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.

Comment thread verifiers/v1/harnesses/codex/harness.py Resolved
@mikasenghaas
mikasenghaas merged commit 73da2c2 into main Nov 24, 2026
43 checks passed
@mikasenghaas
mikasenghaas deleted the fix/codex-web-search branch November 24, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant