# Stop a browser agent clicking the wrong thing after the page changes under it

PaperChase agent use case (free feed entry), version 1.0. Source: [u/OyaAI](https://www.reddit.com/r/AI_Agents/comments/1xhx5bl/how_do_you_stop_a_browser_agent_from_acting_on_a/), 2026-10-28.

## What they did

The failure they designed against is the silent wrong click: the agent picks an element, a modal opens or the person takes over, and the click lands on something else. Each call now carries the current controller and the revision the plan was computed from; a mismatch returns a stale target error. Opening, picking and closing tabs is human only, so the agent can prepare but the person commits.

## Worth knowing

The price is more round trips and treating 'stale' as a normal result. For Playwright or CDP setups, a cheap version is to snapshot before acting and compare the target's text and position just before the click.

## Workflow template

```text
Apply this workflow to [your project]:
1. Record the page revision or a snapshot when the agent plans an action.
2. Just before acting, check the target still matches and the person has not taken over.
3. If anything changed, fail as stale and re-read the page.
4. Keep committing steps (submit, pay, close) with the person.
5. Log stale results so you can see how often the page moved.
Stop and ask me before anything irreversible: deploys, payments, sends or deletes.
```

## Steps

1. **Record the page revision or a snapshot when the agent plans an action.** Record the page revision or a snapshot when the agent plans an action.
2. **Just before acting, check the target still matches and the person has .** Just before acting, check the target still matches and the person has not taken over.
3. **If anything changed, fail as stale and re-read the page.** If anything changed, fail as stale and re-read the page.
4. **Keep committing steps (submit, pay, close) with the person.** Keep committing steps (submit, pay, close) with the person.
5. **Log stale results so you can see how often the page moved.** Log stale results so you can see how often the page moved.

## Credit

Workflow reported by u/OyaAI: https://www.reddit.com/r/AI_Agents/comments/1xhx5bl/how_do_you_stop_a_browser_agent_from_acting_on_a/

Summary and template written by PaperChaseWebb in our own words. Questions: mgmt@paperchasewebb.com
