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
[Bug]: Unscoped browser keypress falls back across workspaces #26069
An unscoped browser keypress can mutate another workspace's active browser page instead of refusing an ambiguous target. This is a target-selection failure, distinct from the explicit-page keyboard-focus issue in #12912 and PR #23895.
Reproduction at the bridge boundary:
Register two live browser pages in different workspaces.
Make the second workspace's page globally active.
Call AgentBrowserBridge.keypress('a') without a workspace or page selector.
Repeat with MediaPlayPause to exercise the helper fallback.
Both calls resolve successfully on current main. The existing strict target policy rejects equivalent ambiguous text-mutating calls, but keypress does not opt into it.
Expected: return browser_target_ambiguous without sending keys or starting the helper. Explicit page selection and valid workspace-scoped calls should continue working.
Adding these regression cases to agent-browser-bridge-keypress-input.test.ts gives 2 failing and 17 passing tests on current main. Enabling the existing requireScopedTarget option for keypress gives 19 passing tests. No new targeting mechanism or setting is needed.
Related: merged #6563 established the strict policy for text-writing commands. This report concerns the remaining keypress admission gap, not terminal focus or keyboard delivery after a page has been resolved.
Activity
AmethystLiang commentedon Oct 7, 2026
Thanks for reporting. Looking into it