Opening a second profile starts a second Orion -P <uuid> process as a LaunchServices child of the first (lsappinfo shows parentASN="Orion" and no pid = field on the child's record). As a result, NSWorkspace.runningApplications and NSRunningApplication(processIdentifier🙂 report the profile process with processIdentifier == -1. Activating a window of the second profile is announced by didActivateApplicationNotification as the first profile's pid.
Effect: window managers and other tools that key on the running-app list (tiling managers, app switchers, automation tools) can't see or manage the second profile's windows, and they attribute its activations to the first profile.
Suggestion: launching the profile process through LaunchServices (e.g. NSWorkspace.openApplication(at:configuration🙂 with createsNewApplicationInstance = true and the profile passed as arguments) should give it a normal registration with its own pid.
macOS 27.0, Orion 152.
NSWorkspace.runningApplications and NSRunningApplication(processIdentifier🙂 report the profile process with proper identifier
152
Tahoe (26)