nbrowser_open_window without a profile silently uses the active one; refuse when several identities are connected
An agent opened a window in the wrong Chrome profile and got as far as Google's account chooser for a forum sign-in before it noticed. Nothing was posted under the wrong account, but nothing in nb stopped it either.
What happened
On John's laptop (AdomLapper), four Chrome profiles have the extension: [email protected] ("John Personal"), [email protected] ("adom.inc", Default), [email protected] ("adom.inc", Profile 2), plus one that has no email. The task was to post on the Autodesk forum as John.
nbrowser_statusreturned{"ok":true, "browser":"chrome", "sessions":[]...}with no profile list, although its_hintsays it is the "connectivity check: connected profiles + active browser".nbrowser_open_window {sessionId, thread, purpose, url}with noprofilesucceeded and opened in whichever profile was active: [email protected].- The forum showed signed out; "Sign in" led to Google's chooser offering only [email protected]. Signing in there would have created or used the wrong Autodesk identity and posted as the wrong person.
The agent did skip the documented preflight (nbrowser_profiles first, then pass profile). But nb already refuses a window without sessionId/thread/purpose (session_unregistered) because the cost of a mistake is high. Driving the wrong account is a bigger mistake than an untracked window.
Ask
- Refuse a missing
profilewhen more than one identity is connected.nbrowser_open_window(andopen_tab) withoutprofileshould fail with a code likeprofile_required, listing the connected profiles asbrowser:email+displayName, with a hint naming the exactprofilevalue to pass. With exactly one identity connected, defaulting is fine. nbrowser_statusshould list the connected profiles, the way its own hint promises: key, email, displayName, asleep, active. Today onlynbrowser_profilesdoes.- Say which identity a window is in, in the
nbrowser_open_windowresponse (profile,email,displayName), so an agent sees "[email protected]" right away instead of discovering it at a sign-in page. - Minor:
nbrowser_profilesreturned three rows with no email or displayName, and [email protected] twice (once Chrome Default, once markedasleepwith displayName "Profile 1"). A note on what those rows are (another browser? stale?) would help an agent choose.
🤖 Generated with Claude Code