DashboardopencodePTY UTF-8 write limit

PTY UTF-8 write limit

Category: gotcha
Confidence: 1.00
ID: 01a07f11-75b2-7f07-820c-a6376e4ab1c4
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 1
Source session: 0bvvC1dq8qm5Ru8hT
Created: 2026-09-08 03:30:45
Updated: 2026-09-08 03:30:45

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 1 10h ago

Content

Trap: bounding and reporting data.length as bytes looks correct for ASCII, but JavaScript length counts UTF-16 code units and multibyte UTF-8 writes can exceed the advertised byte cap. Fix: enforce and report Buffer.byteLength(data) after escape decoding, or explicitly name and document the limit as characters.

Move to: