iOS default selection includes simulators with unavailable runtimes
When Xcode retains simulator records for a removed runtime, xcrun simctl list devices --json includes those records with isAvailable: false. list_simulators() currently discards that field and includes the devices in both device list and default selection.
With an unavailable iPhone Pro in an older runtime and an available iPhone in an installed runtime, the default selector can choose the unavailable Pro and attempt to boot it. This fails even though a usable simulator exists.
Reproduction:
- Use an Xcode installation with a retained simulator whose runtime is unavailable, alongside an available simulator.
- Confirm the retained device has
isAvailable: falseinxcrun simctl list devices --json. - Run
agent-browser device list: the unavailable device is presented as available. - Run
agent-browser -p ios open https://example.comwith no device selector. If the unavailable device wins the existing default preference, launch attempts to boot it instead of using the available simulator.
Expected: exclude simulators marked unavailable from listing and selection. If every simulator is unavailable, report that no simulators are available.
Observed with agent-browser 0.37.1. The same parsing and selection code is present on main at 8bbddb840c74d3c41b01d0b6804b059ba40de56e.
This is separate from the selector forwarding issue #1703 and the WebDriver/Chrome lifecycle issue #1221: it also affects default selection without any explicit selector.
Source: vercel-labs/agent-browser