What I found
bsk 0.3.1 (daemon protocol 1.3, extension 0.3.1, Chrome 153, Linux) silently
auto-accepts every JavaScript dialog and gives the agent no way to do
anything else. There is no dialog command, no accept/dismiss/status
subcommand, and the words dialog/alert/beforeunload appear zero times in
SKILL.md, so agents can't even discover the behavior.
Repro (all on https://example.com, fresh Agent Window session):
bsk evaluate --session <id> "alert('x')"
# null
# dialog: type=alert handled=accepted message=x <- auto-OK, reported. Fine.
bsk evaluate --session <id> "confirm('proceed with delete?')"
# true
# dialog: type=confirm handled=accepted ... <- agent CANNOT cancel.
bsk evaluate --session <id> "prompt('your name?','anonymous')"
# anonymous
# dialog: type=prompt handled=accepted ... <- agent CANNOT type or cancel.
bsk evaluate --session <id> "window.onbeforeunload = () => true; 1"
bsk navigate --session <id> "https://www.iana.org/" # needs prior user gesture or Chrome suppresses it
# dialog: type=beforeunload handled=accepted ... <- "Leave" forced, "Stay" impossible.
Credit where due: the dialog: type=… handled=… message=… report lines are
good — the agent at least learns what happened after the fact.
Why this matters
One confirm("Delete all 200 rows?") on a hostile or sloppy page auto-returns
true and the agent marches on believing the user said yes. Any flow that
needs typed prompt() input or a beforeunload "Stay" is simply unusable —
there is no control surface at all, only the post-hoc report. Forced accept is
safer than a hang, but for confirm/prompt it trades a stall for a wrong
answer, which is worse for destructive actions.
What good looks like elsewhere
- vercel-labs/agent-browser:
dialog accept/dismiss [text],
dialog status, and auto-dismiss limited to alert+beforeunload
(the two types with no real decision); confirm/prompt stay pending for
an explicit agent decision, every response carries the pending dialog as a
warning, --no-auto-dialog opts out (PR #1075 there).
- browser-use harness: exposes CDP
Page.handleJavaScriptDialog
(accept + promptText) and documents reactive (CDP) vs proactive (JS
stub) handling, including the beforeunload navigate-then-dismiss recipe.
Proposal
bsk dialog accept [text] | bsk dialog dismiss [--session …] and
bsk dialog status (pending type/message/url), wired to the same
interception that already produces the dialog: lines.
- Limit auto-accept to
alert (+beforeunload with an opt-out flag);
leave confirm/prompt pending for an explicit decision instead of
answering for the agent.
- Document the
dialog: report lines and the new commands in SKILL.md
(currently zero mentions of dialog/alert/beforeunload).
Happy to re-test any build that adds this.
What I found
bsk0.3.1 (daemon protocol 1.3, extension 0.3.1, Chrome 153, Linux) silentlyauto-accepts every JavaScript dialog and gives the agent no way to do
anything else. There is no
dialogcommand, no accept/dismiss/statussubcommand, and the words dialog/alert/beforeunload appear zero times in
SKILL.md, so agents can't even discover the behavior.Repro (all on
https://example.com, fresh Agent Window session):Credit where due: the
dialog: type=… handled=… message=…report lines aregood — the agent at least learns what happened after the fact.
Why this matters
One
confirm("Delete all 200 rows?")on a hostile or sloppy page auto-returnstrueand the agent marches on believing the user said yes. Any flow thatneeds typed
prompt()input or abeforeunload"Stay" is simply unusable —there is no control surface at all, only the post-hoc report. Forced accept is
safer than a hang, but for
confirm/promptit trades a stall for a wronganswer, which is worse for destructive actions.
What good looks like elsewhere
dialog accept/dismiss [text],dialog status, and auto-dismiss limited toalert+beforeunload(the two types with no real decision);
confirm/promptstay pending foran explicit agent decision, every response carries the pending dialog as a
warning,--no-auto-dialogopts out (PR #1075 there).Page.handleJavaScriptDialog(
accept+promptText) and documents reactive (CDP) vs proactive (JSstub) handling, including the
beforeunloadnavigate-then-dismiss recipe.Proposal
bsk dialog accept [text] | bsk dialog dismiss [--session …]andbsk dialog status(pending type/message/url), wired to the sameinterception that already produces the
dialog:lines.alert(+beforeunloadwith an opt-out flag);leave
confirm/promptpending for an explicit decision instead ofanswering for the agent.
dialog:report lines and the new commands inSKILL.md(currently zero mentions of dialog/alert/beforeunload).
Happy to re-test any build that adds this.