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

> A team building a shared human and agent browser tags every agent action with who is driving the tab and the page revision the plan was based on. If either changed, the action fails as stale and the agent re-reads instead of clicking whatever is now at that spot.

- URL: https://paperchasewebb.ai/bots/marketplace/items/stop-a-browser-agent-clicking-the-wrong-thing-after-the-page-changes-under-it/
- Type: Agent use case pack
- Category: Vibe coding
- By: PaperChaseWebb
- Works with: Plain .md
- Price: Free USD
- Difficulty: Advanced
- Setup time: 1 hr
- Time to result: One working session
- Format: Markdown (.md) file, stop-a-browser-agent-clicking-the-wrong-thing-after-the-page-changes-under-it.md
- Version: 1.0, updated 2026-10-29
- License: Personal and commercial use. Credit the original source when you share the workflow.

## What you end up with

The price is more round trips and treating 'stale' as a normal result.

## What you get

- A plain-language summary of the workflow
- A fill-in prompt template
- What to watch out for
- A link to the original source

## Who it is for

Builders who already use AI agents and want a proven workflow they can copy into their own project.

## Tools needed

- Browser agent: plans and acts in tabs a person also uses
- Control epoch and page revision: attached to every agent call
- You need: An AI coding agent or chat model
- You need: A small real task to try it on

Cost to run: Free with the agent plan you already use.

## How it works

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. Expected: Done before you move to the next step.
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. Expected: Done before you move to the next step.
3. **If anything changed, fail as stale and re-read the page.** If anything changed, fail as stale and re-read the page. Expected: Done before you move to the next step.
4. **Keep committing steps (submit, pay, close) with the person.** Keep committing steps (submit, pay, close) with the person. Expected: Done before you move to the next step.
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. Expected: Done before you move to the next step.

## Sample prompt: Workflow template (Browser agent, Control epoch and page revision)

```
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.
```

Adapted by PaperChaseWebb. Not the original author's prompt.

## Free preview of stop-a-browser-agent-clicking-the-wrong-thing-after-the-page-changes-under-it.md

````markdown
# 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.
````

## 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.
- Figures are as reported by the original author and were not re-measured by us.

## Questions

**Where does this come from?** A public post credited to u/OyaAI. Source: https://www.reddit.com/r/AI_Agents/comments/1xhx5bl/how_do_you_stop_a_browser_agent_from_acting_on_a/

**Is it free?** Yes. Feed entries are free to read and download.

## How to get it

Free sample. Download it directly at https://paperchasewebb.ai/bots/marketplace/items/stop-a-browser-agent-clicking-the-wrong-thing-after-the-page-changes-under-it/, no signup.

Seller: PaperChaseWebb Inc., mgmt@paperchasewebb.com
