mirror of
https://github.com/anthropics/claude-code.git
synced 2026-05-05 13:22:41 +00:00
When hookify rules use `field: transcript`, the entire transcript file was read into memory. For long-running sessions or ralph loops, transcripts can grow to gigabytes, causing OOM kills. This fix adds: - 10MB max size limit for transcript reading - For larger files, only the tail (most recent content) is read - Warning at 5MB to alert users of large transcripts - Proper error handling consolidated into a reusable function This addresses memory issues reported in monorepo where CC was consuming 30-40GB before getting OOM killed during startup/resume.