Viewer presence is process-global (viewers.ts module state), the live queue is per-session (live.ts claims WHERE t.session_id = ?), and one server holds many sessions. A page open on one session and an agent parked on another wait forever for each other — this happened for real (the port-5394 incident).
Given real usage is one agent + one worktree + one review, either the claim route should serve the whole instance (the request already carries its sessionId), or the server should commit to one-review-per-process.
Effort: S–M.
Viewer presence is process-global (
viewers.tsmodule state), the live queue is per-session (live.tsclaimsWHERE t.session_id = ?), and one server holds many sessions. A page open on one session and an agent parked on another wait forever for each other — this happened for real (the port-5394 incident).Given real usage is one agent + one worktree + one review, either the claim route should serve the whole instance (the request already carries its sessionId), or the server should commit to one-review-per-process.
Effort: S–M.