Problem
Global persistent logging chooses a log file based on its size at session start, but mirrored stderr writes can append arbitrarily large strings. A single huge stderr write can therefore overshoot the configured max log size before the next session rotates.
Evidence
GlobalToolLog.ResolveLogPath selects a file whose current size is below the configured max.
TeeTextWriter.Write / WriteLine forwards the full value to the secondary log writer without per-write truncation or rotation.
Suggested fix
Add per-write truncation for mirrored stderr, or check/rotate the log writer before large writes.
Problem
Global persistent logging chooses a log file based on its size at session start, but mirrored stderr writes can append arbitrarily large strings. A single huge stderr write can therefore overshoot the configured max log size before the next session rotates.
Evidence
GlobalToolLog.ResolveLogPathselects a file whose current size is below the configured max.TeeTextWriter.Write/WriteLineforwards the full value to the secondary log writer without per-write truncation or rotation.Suggested fix
Add per-write truncation for mirrored stderr, or check/rotate the log writer before large writes.