Problem
Hackbrowser crawls often terminate after only 3-5 pages, especially with:
- Weaker AI models (GPT-4o-mini, Haiku) that fail to generate valid page plans
- SPA targets where navigation is done via onClick handlers, not
<a href> tags
- Multi-credential mode where redirect detection produces false positives
Root Causes (from audit)
-
planPage returns empty plan on model failure — navigator.ts:131. When LLM output can't be parsed, { tasks: [] } is returned. No actions executed, no new endpoints discovered.
-
collectDOMLinks only collects <a href> — agent.ts:1592. Misses <form action>, <button>, [data-href], [onclick], SPA router elements. On modern SPAs this finds 0-3 links.
-
ACCESS_DENIED_PATTERNS false positives — agent.ts:1949. Regex /\/(login|signin|...|auth)/i matches legitimate pages like /auth/profile, /auth/settings.
-
MAX_PER_PATH_PATTERN = 5 too aggressive — agent.ts:566. Same pathname + param keys pattern limited to 5 URLs.
-
resolveElement failures silently dropped — agent.ts:1226. Wrong role/label from weak model → all tasks silently skipped.
-
No network-based URL discovery — page.on("request") captures traffic but doesn't feed discovered URLs back into the page queue. JS files, XHR calls, and API endpoints are invisible to the crawler.
Expected Behavior
- Crawl should explore significantly more pages before terminating
- Network traffic (JS, XHR, fetch) should feed back into discovery
- Weak model failures should fall back to mechanical DOM interaction
- Browser should stay useful after scan completion (capture manual browsing)
Related
Problem
Hackbrowser crawls often terminate after only 3-5 pages, especially with:
<a href>tagsRoot Causes (from audit)
planPagereturns empty plan on model failure —navigator.ts:131. When LLM output can't be parsed,{ tasks: [] }is returned. No actions executed, no new endpoints discovered.collectDOMLinksonly collects<a href>—agent.ts:1592. Misses<form action>,<button>,[data-href],[onclick], SPA router elements. On modern SPAs this finds 0-3 links.ACCESS_DENIED_PATTERNSfalse positives —agent.ts:1949. Regex/\/(login|signin|...|auth)/imatches legitimate pages like/auth/profile,/auth/settings.MAX_PER_PATH_PATTERN = 5too aggressive —agent.ts:566. Same pathname + param keys pattern limited to 5 URLs.resolveElementfailures silently dropped —agent.ts:1226. Wrong role/label from weak model → all tasks silently skipped.No network-based URL discovery —
page.on("request")captures traffic but doesn't feed discovered URLs back into the page queue. JS files, XHR calls, and API endpoints are invisible to the crawler.Expected Behavior
Related