agent-device 0.21.0, macOS, Node 24.18. Found while driving iOS and Android from one checkout for a visual regression PoC (callstack/react-native-paper#5115).
Sessions are keyed by cwd and bound to the first device they touch. After open … --platform ios --udid … from a directory, running boot --platform android --device Pixel_10_Pro from the same directory fails:
INVALID_ARGS: … already bound to apple device "iPhone 17 Pro" … but this request selected --platform=android
The hint (pass a different --session) is correct and --session android works. But a repo that tests both platforms then has to invent and thread session names by hand through every command, and a script that forgets one flag silently talks to the wrong device. Two smaller consequences of the same design:
- a leftover session from an earlier run in a repo root kept the wrong simulator bound; the workaround was to run from a different directory rather than
close a session another process might own;
- when this script itself ran under
npx -p node@20 node …, the nested npx agent-device inherited npm_config_package and installed node instead. Unrelated to sessions but the same class: environment leaking into what the CLI resolves.
Suggestion: key sessions by cwd + platform by default, or make --platform select a per-platform default session so the common two-platform case needs no naming.
agent-device 0.21.0, macOS, Node 24.18. Found while driving iOS and Android from one checkout for a visual regression PoC (callstack/react-native-paper#5115).
Sessions are keyed by cwd and bound to the first device they touch. After
open … --platform ios --udid …from a directory, runningboot --platform android --device Pixel_10_Profrom the same directory fails:The hint (pass a different
--session) is correct and--session androidworks. But a repo that tests both platforms then has to invent and thread session names by hand through every command, and a script that forgets one flag silently talks to the wrong device. Two smaller consequences of the same design:closea session another process might own;npx -p node@20 node …, the nestednpx agent-deviceinheritednpm_config_packageand installed node instead. Unrelated to sessions but the same class: environment leaking into what the CLI resolves.Suggestion: key sessions by cwd + platform by default, or make
--platformselect a per-platform default session so the common two-platform case needs no naming.