MAX_TAIL_BYTES
constMAX_TAIL_BYTES:number
Defined in: src/activity.ts:141
512 KB is far larger than the stall window’s worth of JSONL records (a few hundred bytes each × the last few hundred turns), so signal accuracy is fully preserved while bounding the bytes fed to JSON.parse on every poll tick.
Scope note: this bounds the per-call cost, but the read+parse is still SYNCHRONOUS and runs once per poll tick per running session, so total on-loop cost still scales with the number of concurrent running sessions. It’s a bounded mitigation (each call is small + fast), not a full off-loop move; if session counts ever make even the bounded parses add up, move the probe to an async read + worker/streamed parse.