Skip to content

Actions report same-document (SPA) navigations like page loads, but not reloads #3394

Description

@thomasbachem

Description of the bug

After an input tool or evaluate_script, the response adds Page navigated to <url>. whenever the page URL differs from before the action. The URL is all that decides it, so:

  • A same-document navigation (history.pushState, a fragment link) gets the same line as a full page load
  • A navigation that loads a new document at the same URL gets no line, like location.reload() or a form POST that redirects back to the same page

What an agent needs from that line is whether the document was replaced, as that decides whether page state, globals from earlier evaluate_script calls and the console survived. I had an agent take that line for a reload in a single-page app and report a setting lost on reload, when only the route had changed.

PageCollector has told the two apart since #2676, so list_console_messages keeps its history across same-document navigations.

Reproduction

  1. navigate_page to https://example.com
  2. evaluate_script with () => history.pushState({}, '', '/other'). The response ends with Page navigated to https://example.com/other. although nothing loaded (performance.timeOrigin stays the same)
  3. evaluate_script with () => { setTimeout(() => location.reload()); }. No navigation line, although the page reloaded (performance.timeOrigin changed)

Clicks behave the same. A fragment link reports like step 2.

Expectation

The line tells a same-document navigation apart from a new document, and a new document gets reported even when the URL stays the same.

MCP configuration

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["-y", "chrome-devtools-mcp@1.12.0", "--headless", "--isolated", "--no-usage-statistics"]
    }
  }
}

Chrome DevTools MCP version

1.12.0, also on main at 8d009e8

Chrome version

156.0.8078.80

Coding agent version

Claude Code 2.1.309

Model version

Claude Opus 5.5

Chat log

None, the reproduction above needs no agent

Node version

v26.11.0

Operating system

macOS

Extra checklist

  • I want to provide a PR to fix this bug

Activity

  1. added theissue type on Nov 4, 2026
  2. added a commit that references this issue on Dec 1, 2026
    2732e75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions