Skip to content

standalone websearch extension#23823

Merged
sayan-oai merged 6 commits into
mainfrom
codex/standalone-web-search-extension
May 26, 2026
Merged

standalone websearch extension#23823
sayan-oai merged 6 commits into
mainfrom
codex/standalone-web-search-extension

Conversation

@sayan-oai
Copy link
Copy Markdown
Collaborator

Summary

Add the extension-backed standalone web.run tool so Codex can call the standalone search endpoint through the codex-api search client and return its encrypted output to Responses.

  • gate the new tool behind standalone_web_search
  • install the extension in the app-server thread registry and hide hosted web_search when standalone search is enabled for OpenAI providers so the two paths stay mutually exclusive
  • build search context from persisted history using a small tail heuristic: previous user message, assistant text between the last two user turns capped at about 1k tokens, and current user message

Test Plan

  • cargo test -p codex-web-search-extension
  • cargo test -p codex-api
  • cargo test -p codex-core hosted_tools_follow_provider_auth_model_and_config_gates

@sayan-oai sayan-oai marked this pull request as ready for review May 21, 2026 04:41
@sayan-oai sayan-oai requested a review from a team as a code owner May 21, 2026 04:41
@sayan-oai sayan-oai changed the title [codex] Add standalone web search extension standalone websearch extension May 21, 2026
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cdd92100c7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/ext/web-search/src/extension.rs Outdated
Comment thread codex-rs/ext/web-search/src/tool.rs Outdated
Comment thread codex-rs/ext/web-search/src/history.rs Outdated
Comment thread codex-rs/Cargo.toml
Comment thread codex-rs/core/src/tools/spec_plan.rs Outdated
Comment thread codex-rs/ext/web-search/web_run_description.md
Comment thread codex-rs/ext/web-search/src/history.rs Outdated
Comment thread codex-rs/ext/web-search/src/extension.rs Outdated
Comment thread codex-rs/ext/web-search/src/history.rs Outdated
Comment thread codex-rs/ext/web-search/src/extension.rs Outdated
Copy link
Copy Markdown

@usgenes39-dotcom usgenes39-dotcom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two blocking standalone-search semantics issues on the current head.

Current head fixes the earlier disabled-mode and settings-forwarding problems, but recent_input still sends unbounded user text/image content to alpha/search, and hosted web_search is hidden for OpenAI providers even in ThreadManager paths that do not install the standalone extension. That creates both unbounded search-context/cost risk and a product regression where web search disappears outside app-server. CI is not fully green on this head because the Bazel workflow was cancelled, and the PR is currently reported as not mergeable.

Comment thread codex-rs/ext/web-search/src/history.rs
Comment thread codex-rs/core/src/tools/spec_plan.rs Outdated
Comment thread codex-rs/ext/web-search/src/tool.rs
use serde_json::Map;
use serde_json::Value;

pub(crate) fn commands_schema() -> Value {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be interesting reusable method in the future

use codex_protocol::models::ResponseItem;
use schemars::JsonSchema;
use serde::Deserialize;
use serde::Serialize;
Copy link
Copy Markdown
Collaborator

@pakrym-oai pakrym-oai May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we'd split APIs as well

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very non-blocking

@sayan-oai sayan-oai force-pushed the codex/standalone-web-search-extension branch from 4fe6460 to 4660ae3 Compare May 22, 2026 05:02
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO looking way better. Happy to stamp once this is green and merged with main

}

fn to_response_item(&self, call_id: &str, _payload: &ToolPayload) -> ResponseInputItem {
ResponseInputItem::FunctionCallOutput {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will loose context pollution toggle but I'll take that as a follow-up

Comment thread codex-rs/ext/web-search/src/history.rs Outdated
Comment thread codex-rs/ext/web-search/src/history.rs Outdated
@sayan-oai sayan-oai force-pushed the codex/standalone-web-search-extension branch from 4660ae3 to ac1fcb0 Compare May 22, 2026 15:37
@sayan-oai sayan-oai force-pushed the codex/standalone-web-search-extension branch from ac1fcb0 to ad5959c Compare May 26, 2026 17:10
@sayan-oai sayan-oai merged commit a22706d into main May 26, 2026
59 of 62 checks passed
@sayan-oai sayan-oai deleted the codex/standalone-web-search-extension branch May 26, 2026 18:12
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants