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
Avoid activating tabs in the default CDP startup sequence #8
Hi! I noticed a small concurrency problem when multiple agents use browser-harness-js against the same Chrome instance.
The startup sequence in interaction-skills/connection.md currently includes Target.activateTarget(...) after session.use(targetId). Agents tend to follow that literally, so concurrent agents repeatedly pull their own tabs to the foreground and fight over the visible active tab.
session.use() is enough to attach and route page-level CDP commands to a target; Target.activateTarget() is only needed when the tab should actually be brought to the foreground. interaction-skills/tabs.md already describes those two operations as independent.
I also tested the background case locally: Runtime/DOM inspection, navigation, screenshots, mouse clicks, and text input all worked on a background target without activating it.
Would it make sense to remove the activation step from the default startup sequence and mark the existing "Bringing Chrome to front" section as something to use when needed? The change is docs-only and very small.
Activity
ZJHSteven commentedon Sep 1, 2026
I opened #9 with the small docs-only change described above.