Skip to content

[WIP] Search#2191

Open
ngafar wants to merge 4 commits intodevfrom
feat/search
Open

[WIP] Search#2191
ngafar wants to merge 4 commits intodevfrom
feat/search

Conversation

@ngafar
Copy link
Collaborator

@ngafar ngafar commented Feb 20, 2026

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context, and the specification if there is one.

Testing

Please provide a list of the ways you can "access" or use the functionality. Please try and be exhaustive here, and make sure that you test everything you list.

  • I have tested this on real data that is reasonable and large
  • If I changed the interaction with JupyterLab, I tested that it does not break other programs (like VS Code), and tested that it works "multiple times" in the same notebook.

Documentation

Note if any new documentation needs to addressed or reviewed.


Note

Medium Risk
Adds new agent control-flow and external network calls via OpenAI’s Responses API; failures or provider mismatches could alter agent execution behavior or chat history consistency.

Overview
Adds a new agent tool, web_search, allowing the agent to request up-to-date information and receive results back in-band.

On the backend, AgentResponse now supports web_search with web_search_query/web_search_results; AgentExecutionHandler detects this response type, runs an OpenAI Responses API search via a new OpenAIClient.web_search, appends the results into message history, and injects them into the returned JSON payload for the frontend.

On the frontend, agent execution and chat history handling are updated to recognize/display web_search results and to automatically continue the agent loop after a search, plus a small bugfix in getLastAIDisplayOptimizedChatItem’s index check.

Written by Cursor Bugbot for commit a8543ee. Configure here.

@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
monorepo Ready Ready Preview, Comment Feb 20, 2026 9:34pm

Request Review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

thread_id,
)

return search_result
Copy link

Choose a reason for hiding this comment

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

Web search messages stored out of order

Medium Severity

perform_agent_web_search_if_requested appends the “web search results” assistant message to message_history before the original assistant web_search response (which is appended later in agent_execution_handler.py). This reverses chronology and creates consecutive assistant messages, which can confuse the next agent turn and make the conversation history inconsistent.

Additional Locations (1)

Fix in Cursor Fix in Web

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