Skip to content

fix(runtime): disable builtin web search for Codex runs - #1321

Open
lanqing431 wants to merge 1 commit into
Tencent:mainfrom
lanqing431:fix/codex-run-disable-web-search
Open

lanqing431 wants to merge 1 commit into
Tencent:mainfrom
lanqing431:fix/codex-run-disable-web-search

Conversation

@lanqing431

Copy link
Copy Markdown

What changed

Codex run nodes can advertise their built-in web_search tool to an OpenAI-compatible gateway that does not support it, causing the first turn to fail with HTTP 400. The chat path already disables that tool.

Set web_search="disabled" in the final Codex provider argv, before the resume subcommand. Applying the policy here covers existing saved executors and the live CLI harness without changing catalog data. The Agent's MCP configuration remains available.

Add four cases to the existing provider suite (existing executor, cached/live search overrides and resume), and make the existing real-CLI gateway acceptance test reject built-in web-search tool declarations.

Fixes #1313.

Scope

  • Platform core / API / runner
  • Public adapter / deployment
  • Classic
  • Portable
  • Shared behavior contract
  • Installer / CLI
  • Documentation only

Compatibility

No schema, credential, protocol or persisted-executor migration. Run nodes consistently disable Codex's native search, matching the existing chat policy; this intentionally overrides a saved cached/live native-search setting. MCP and the final prompt are preserved, including on resume.

Validation

Exact tested head: ad2d5a03ca5d7af18b697fe5eac40146404d26e6, based on 2ad5659be8844fe4a4dfd12253b3584d9e4f1d14.

  • Red/green regression proof with real Codex 0.172.0: with only production code restored to the base, all four new argv cases fail and the real CLI receives the fixture gateway's HTTP 400 for advertising web_search. Restoring the fix passes all cases and the same CLI completes with one gateway request. No paid model or production credentials used. Changed files also pass gofmt.
  • Unchanged platform workflow: core, browser, first-run and platform-required all passed. Includes the full Go suite, real-Chromium Go tests, Go/UI coverage gates, API and public-browser acceptance, native CLI gateway/MCP checks with the workflow-pinned Codex 0.162.1, go vet, govulncheck, public-content and secret checks.
  • Local edition E2E workflow: passed on all four Linux/macOS, Python/Node matrix cells, plus the Chromium dashboard test and required aggregate.
  • Repository validation workflow: passed, including Python 3.8/3.12, secret scanning and install checks.

These are fork CI results on the exact head, not claims about upstream review or merge approval. The additional regression-proof workflow lives only on a fork validation branch and is not part of this PR.

Safety

  • I did not include credentials, internal endpoints, production data, or organization-specific infrastructure.
  • I preserved user files and unrelated changes.
  • I updated generated Classic host bundles when applicable. (Not applicable: platform runtime only.)
  • I documented third-party content and licensing changes when applicable. (No third-party content added.)

Prepared with Codex assistance, including source analysis, implementation, regression tests and verification.

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.

[Bug]: Codex executor always advertises its builtin web_search, so every SOP node 400s behind an OpenAI-compatible gateway

1 participant