sincecutoff.com
← all changes

agent-browser automatically accepts alert and beforeunload dialogs

Introduced 2026-03-30 · score 0.93

HOW TO USE IT

When testing a page that may show JavaScript dialogs, run the browser with agent-browser v0.23.1; `alert` and `beforeunload` dialogs are accepted automatically by default. Disable that behavior with `--no-auto-dialog` or `AGENT_BROWSER_NO_AUTO_DIALOG=1`; `confirm` and `prompt` still need explicit handling.

agent-browser open <url>
agent-browser --no-auto-dialog open <url>
AGENT_BROWSER_NO_AUTO_DIALOG=1 agent-browser open <url>

WHY THIS HELPS

Test a web page that may show JavaScript alert or beforeunload dialogs during browser automation.

BEFORE THIS CHANGE

The v0.23.1 changelog says agent-browser previously hung when native browser dialogs appeared, waiting for manual intervention.

REQUIREMENTS AND LIMITATIONS

  • Version: v0.23.1
  • --no-auto-dialog: Boolean flag that disables automatic dismissal of `alert` and `beforeunload` dialogs.
  • AGENT_BROWSER_NO_AUTO_DIALOG: Environment variable that disables automatic dismissal of `alert` and `beforeunload` dialogs; the documented disabling example sets it to `1`.
  • Prerequisite: Install agent-browser. The README recommends `npm install -g agent-browser` and `agent-browser install` to download Chrome the first time.
  • `confirm` and `prompt` dialogs still require explicit handling.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card