mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-30 13:35:12 +02:00
Both reviewers were right and the original guidance was self-contradictory: it said attachments are charged to the context window, then told the report to exclude them when stating remaining room. Greptile's P1 is the sharper half — after a compaction, pre-compaction turns remain in the JSONL while the model's active context holds only the summary, so counting persisted bytes misreports headroom in the other direction too. The section now says plainly that a transcript is a durable log, not a view of the context window, and that remaining room must not be reported from its size. The number is framed as a cost signal instead: scaffolding is rebuilt on every reconnect, so trimming a component saves tokens once per reconnect rather than once per session. Snippet fixes: emits an explicit >40% warning with one decimal place rather than leaving the threshold in prose, guards a missing transcript, exits cleanly on an empty one, counts bytes rather than characters, and treats a malformed line as conversation instead of crashing. Verified against all four cases.