Task 2 of the terminal file viewer plan: ViewerRegistry tracks which file-viewer-<n> window is looking at which container path. reserve() takes the cap check and label allocation atomically under one lock so two concurrent open requests cannot both slip past the 20-window cap; find_open() only matches windows in the Resolved state, so a window still choosing a candidate or reporting not-found is never treated as "open on" a path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>