DashboardopencodePTY aggregate retention bounds

PTY aggregate retention bounds

Category: gotcha
Confidence: 1.00
ID: 01a07f11-7479-7308-bc6a-231f3a4239f8
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 1
Source session: 07PmcXIbo6QNZwYRV
Created: 2026-09-08 02:32:48
Updated: 2026-09-08 03:30:45

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 1 2h ago

Content

Trap: per-owner/global count checks look sufficient, but concurrent pty_spawn calls can both pass authorization and stale counts before either inserts a Session. Fix: reserve owner and Location capacity atomically before the first asynchronous spawn boundary, release reservations on failure, combine global bounds with owner quotas, and evict only confirmed-exited owner sessions.

Move to: