fix: ignore leading transcript bytes in tail scan

This commit is contained in:
Peter Steinberger
2026-05-28 04:20:01 -04:00
parent e397636051
commit b005f01c13

View File

@@ -560,7 +560,7 @@ async function readLastNonzeroUsageFromSessionLog(logPath: string): Promise<Sess
return usage
? {
usage,
trailingBytes: Math.max(0, stat.size - Buffer.byteLength(leadingPartial, "utf8")),
trailingBytes: 0,
byteSize: stat.size,
}
: { byteSize: stat.size };