Fixes terminal reliability by rendering only the active terminal tab, deferring focus to avoid race conditions, and closing the terminal WebSocket with a normal close code. It also hardens PTY subscriber tokening so output doesn’t leak across connections (including when socket metadata mutates in-place), with updated e2e and unit tests to match. Concerns: the new token() heuristics and unconditional subscriber pruning could inadvertently disconnect valid clients if their ws.data shape changes unexpectedly, and the shift to single-terminal rendering may have side effects for background tab state/persistence.

Terminal tab focus and PTY isolation fix - anomalyco/opencode