Skip to content

Studio: let the browser agent follow search-result redirect links shown on the page - #14642

Merged
danielhanchen merged 5 commits into
mainfrom
studio-browser-agent-redirect-links
Oct 23, 2026
Merged

danielhanchen merged 5 commits into
mainfrom
studio-browser-agent-redirect-links

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Follow-up to #14427.

Problem. #14427 gates Google /url?q= and DuckDuckGo /l/?uddg= redirect links on the page they land on. The agent's record of the links on the page it last read still holds only the raw wrapper URL, so the landing page never matched it. Clicking a search result on a DuckDuckGo (or wrapped Google) results page, which used to just open, now stops with "Open ?" every time, even though the link is right there on the page.

Change. When a snapshot or find records the page's links, each redirect link also records the pages it leads to (the same unwrapRedirect chain the tab follows). Clicking or navigating to a search result on the page is then treated as following an on-page link, so it opens without a question, as any other on-page link does. The protection from #14427 stays in place:

  • The gate still runs on the real destination, so site blocks and the backend's redirect checks still apply.
  • A redirect link the model makes up (not on the page), or one pointing anywhere other than the result shown, still asks.
  • The wrapper hops keep their own gates.

The recorded set comes from a pure function of the page's links, so recording the same page twice gives the same result.

Testing.

  • tests/browser-agent-redirect-gate.test.ts: 6/6 pass with the change. With only the source change reverted, 4/6 pass. The two new flow tests fail there: an on-page wrapped result opening without a question, and a clicked search result opening without a question. Still passing with the change: a made-up redirect to a new site asks before loading (Google and DuckDuckGo), a made-up redirect to a site not on the page asks, and an on-page redirect to a blocked site is refused without loading.
  • Neighbouring browser agent tests (executor, gate, always-allow, chats, address, drag, point, script, page-wait, cursor): 53/53 pass with the change, 53/53 on base.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T09:38:37.747993Z 0391fda Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 0391fda423

ℹ️ 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".

@danielhanchen danielhanchen self-assigned this Oct 22, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

pre-commit.ci run

@danielhanchen

Copy link
Copy Markdown
Member Author

pre-commit.ci run

@danielhanchen
danielhanchen merged commit 05c9ab1 into main Oct 23, 2026
4 of 38 checks passed
@danielhanchen
danielhanchen deleted the studio-browser-agent-redirect-links branch October 23, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant