DashboardopencodePTY authorization, allocation, and stre…

PTY authorization, allocation, and stream safety

Category: gotcha
Confidence: 1.00
ID: 01a0ae82-559f-70c5-a7c0-a17bb85e8e43
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 1
Source session: 1RrS1SJqju8uNiFRa
Created: 2026-09-08 02:49:59
Updated: 2026-09-17 08:36:12

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 1 16h ago

Content

PTY authorization resources must use the same canonical boundary-preserving argv serialization as execution; joining arguments with spaces can collapse distinct commands. Bound input writes, queued bytes, retained output, worker output, and line scanning during collection—not after splitting—because grep prefixes and ignored backpressure can amplify memory. Attach child and stream error listeners before checking process state, handle stdin.write callbacks, backpressure, closed-stream races, and EPIPE, and apply identical protections to regex-worker stdin.

Move to: