fix(evaluate_script): warn against using window.location.href for navigation
Description
LLM agents sometimes attempt to navigate between pages using window.location.href inside evaluate_script. This kills the JavaScript execution context, causing the script to hang indefinitely.
This fix adds an explicit warning in the tool description directing agents to use navigate_page instead.
Related Issue
Fixes #1894
Type of Change
- [x] Bug fix
- [ ] New feature
- [ ] Breaking change
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Thanks for the PR but the difficulty here is not in generating a fix but running evals to make sure they work. I will close it in favour of the team handling the bugs marked with the "evals" label.
Apenas SMS
Em sáb., 23 de mai. de 2026 às 04:49, Alex Rudenko @.***> escreveu:
OrKoN left a comment (ChromeDevTools/chrome-devtools-mcp#2101) https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/2101#issuecomment-4524672940
Thanks for the PR but the difficulty here is not in generating a fix but running evals to make sure they work. I will close it in favour of the team handling the bugs marked with the "evals" label.
— Reply to this email directly, view it on GitHub https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/2101#issuecomment-4524672940, or unsubscribe https://github.com/notifications/unsubscribe-auth/CDNASIONLWH6R7GB6MXYRVT44FJXDAVCNFSM6AAAAACZJYCPSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKMRUGY3TEOJUGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>