Skip to content

fix(browser): say when a site blocks the built-in browser - #261

Merged
its-janghoon merged 1 commit into
developfrom
fix/blockedsite
Nov 13, 2026
Merged

its-janghoon merged 1 commit into
developfrom
fix/blockedsite

Conversation

@its-janghoon

Copy link
Copy Markdown
Member

What's done

A real run of "쿠팡에서 에어팟 프로 3 가격 찾아서 제일 싼 거 3개 알려줘" got Access Denied from Coupang in the headless browser. The model then quietly answered from web search snippets as if it had read them on Coupang.

  • packages/redrob/src/browser/blocked.ts: blocked({title, text}) names the block. It covers Access Denied, 403 Forbidden, captcha (also 보안문자 and 자동입력 방지), robot checks, Cloudflare challenges and generic block pages. It only checks the title and pages under 3,000 characters, so a site that merely mentions reCAPTCHA is not flagged.
  • UserBrowser.onBlocked: when a reading from the built-in browser is blocked and the person's Chrome is linked right now, the page is opened once in their Chrome. Otherwise the result gets Blocked: <host> showed <sign> to this headless browser, so nothing below is the site's content. That line tells the model to tell the person, to say that an answer from search results comes from search results and not from the host, and, once per session, how to connect their Chrome (the fix(tui): show browser tool calls in the person's language #260 line, plus metadata.connect for the TUI).
  • browser.txt: use this tool, not web search, for prices and stock in a shop, bookings, anything behind a sign-in, or a site with a bot check. It runs in the person's Chrome whenever that is linked (unchanged: UserBrowser.act tries the linked Chrome first on every call). Both browser.txt and websearch.txt say to state when the answer comes from search results because the site blocked the browser.

What's not done

  • Windows check: SSH to msi-linux still times out (port 22), so it was skipped.

Checks

  • test/browser/blocked.test.ts: 13 tests (each block sign, sites that are not blocks, the note with the connect line once per session, the retry in a linked Chrome, the description text). test/browser and test/tool/websearch.test.ts: 43 pass. tsgo --noEmit passes.
  • This Linux host (no engine service, so the headless Chromium), bun run --conditions=browser ./src/index.ts run --format json:
    • Coupang: browser open coupang returned Blocked: www.coupang.com showed Access Denied …, then websearch. The answer opens with "쿠팡 웹사이트가 자체 브라우저의 직접 접근을 차단(Access Denied)하여, 검색 결과에 수집된 쿠팡 판매 가격 … 시점 차이로 인해 현재 가격과 약간 다를 수 있음" and ends with how to connect Chrome with the Redrob extension.
    • "인터넷에서 오늘 서울 날씨": web search only, as before.
    • "브라우저 열어서 네이버에서 …": browser only (open, scroll, open blog tab), no block note; the answer names the first results.

Asked for Coupang prices, the headless browser got "Access Denied", and
the model quietly answered from web search snippets as if it had read
them on Coupang, without telling the person to connect their Chrome.

- browser/blocked.ts: one helper that reads the title and the start of a
  short page for Access Denied, 403 Forbidden, captchas (also 보안문자 /
  자동입력 방지), robot checks and Cloudflare challenges.
- A blocked reading from the built-in browser is tried once in the
  person's Chrome when it is linked now. Otherwise the result starts with
  `Blocked: <host> showed <sign> ...`, which tells the model to tell the
  person, to say an answer from search results comes from search results
  and not the site, and (once per session) how to connect their Chrome.
  The TUI gets metadata.connect for its how-to-connect line.
- The browser tool description says shops, bookings, sign-ins and bot
  checks need the browser tool, not web search. The browser and web
  search descriptions both say to state when an answer comes from search
  results because the site blocked the browser.
@its-janghoon

Copy link
Copy Markdown
Member Author

Self-review.

  • Scope: one small helper, one hook after each built-in-browser reading (in both the session tool and the core v2 tool), and description text. No new route or setting.
  • False positives: block signs are matched on the title, or on the text only when the page is under 3,000 characters. A shop page with "reCAPTCHA" in its footer is not flagged (there is a test for that). A missed block only means the old behaviour.
  • The retry in the person's Chrome runs only when /desk/status says ready right now. It never starts a pairing wait from inside a block. If the retry fails, the note goes out as usual.
  • The note is model-facing English like the rest of the result. The real Coupang run shows the model passing it on in Korean, saying the prices come from search results and may differ, and giving the connect steps.
  • Not done: the Windows check, because msi-linux SSH times out.

@its-janghoon
its-janghoon merged commit 5cc1a09 into develop Nov 13, 2026
12 checks passed
@its-janghoon
its-janghoon deleted the fix/blockedsite branch November 13, 2026 10:56
@its-janghoon its-janghoon mentioned this pull request Nov 13, 2026
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