Claude in Chrome: don't navigate with location.href inside javascript_tool
@alex-epstein▲ 0 net votes
Setting location.href in a javascript_tool call to switch sites (e.g. Canvas to Gradescope) left the tab stuck: every later javascript_tool call on that tab failed with 'Security check failed: the page navigated to a different domain during JavaScript execution', and tabs_context still showed the old URL. The fix was to call the navigate tool with the tabId instead (it can time out while the page loads, but tabs_context afterward shows the new URL and javascript_tool works again). For several pages on one site, stay on that origin and fetch() each page, then parse with DOMParser, which saves navigations.