You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let agents go back, forward, reload and hard reload a preview tab
#32852
In the Browser panel, the user has Back, Forward, Refresh and Hard reload. Agents have none of them. preview_navigate takes only url or target, so the only route is preview_evaluate with location.reload() or history.back():
It returns before the navigation starts, so the next snapshot can show the old page.
It reports no error when there is no earlier or later page.
Nothing an agent can call bypasses the cache. After a CSS change behind a long Cache-Control, the agent cannot load the new styles, while the user can with one click on Hard reload.
Agents do use that fallback. In one developer's threads, an agent called preview_evaluate with location.reload() 19 times over six days to refresh its tab. AGENTS.md, under "Hit every surface", says: "A capability a user can trigger is usually one an agent should reach through MCP tools".
Proposal: one optional action on preview_navigate, with the values back, forward, reload and hardReload. hardReload sends the same Page.reload {ignoreCache: true} as the user's Hard reload.
Exactly one of url, target and action.
The same ownership, human-control and dialog rules, readiness wait and result as URL navigation.
A clear error when there is no history entry, for example "This tab has no earlier page to go back to."
If you want it smaller, hardReload is the value to drop.
Cost: 203 more bytes in the MCP tool list, one Page.getNavigationHistory round trip per action, and no new status fields.
Evals, 3 samples: a new case asks the agent to load changed CSS that is cached for a long time. It went from 0/3 to 3/3 on Claude Sonnet 5.5 and GPT-6.1 Sol, and from 0/3 to 2/3 on Claude Opus 5.5, whose one miss reloaded through preview_evaluate. Nearby preview guard cases pass 3/3 on both sides on Sonnet.
Checked in a desktop dev build: a hard reload loaded the changed CSS, so the cache was really bypassed, and back and forward worked across origins.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
In the Browser panel, the user has Back, Forward, Refresh and Hard reload. Agents have none of them.
preview_navigatetakes onlyurlortarget, so the only route ispreview_evaluatewithlocation.reload()orhistory.back():Cache-Control, the agent cannot load the new styles, while the user can with one click on Hard reload.Agents do use that fallback. In one developer's threads, an agent called
preview_evaluatewithlocation.reload()19 times over six days to refresh its tab. AGENTS.md, under "Hit every surface", says: "A capability a user can trigger is usually one an agent should reach through MCP tools".Proposal: one optional
actiononpreview_navigate, with the valuesback,forward,reloadandhardReload.hardReloadsends the samePage.reload {ignoreCache: true}as the user's Hard reload.url,targetandaction.hardReloadis the value to drop.Cost: 203 more bytes in the MCP tool list, one
Page.getNavigationHistoryround trip per action, and no new status fields.Evals, 3 samples: a new case asks the agent to load changed CSS that is cached for a long time. It went from 0/3 to 3/3 on Claude Sonnet 5.5 and GPT-6.1 Sol, and from 0/3 to 2/3 on Claude Opus 5.5, whose one miss reloaded through
preview_evaluate. Nearby preview guard cases pass 3/3 on both sides on Sonnet.Checked in a desktop dev build: a hard reload loaded the changed CSS, so the cache was really bypassed, and back and forward worked across origins.
Branch: main...Entrpi:t3code:fix/preview-navigate-history
Would you take this as a PR?
All reactions