{"version":"2.1.239","anchor":"transcript-writer-knows-when-writes-are-still-outstanding","canonical_anchor":"transcript-writer-knows-when-writes-are-still-outstanding","heading":"Transcript writer knows when writes are still outstanding","tier":"internal","area":"Sessions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.239\/e\/transcript-writer-knows-when-writes-are-still-outstanding","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.239","markdown":"### Transcript writer knows when writes are still outstanding\n\nThe transcript writer can now report whether writes are still pending, so nothing reads a half-written file.\n\n**What**\n\nThe component that writes your session transcript now counts writes in progress and exposes a check for whether any remain, so other code can wait rather than acting on a partly written file.\n\n**Details**\n\n- Separate counters track queued flushes and direct appends, each decremented in a `finally` block so a failed write does not leave the count stuck.\n\n**Evidence**\n\n`appendInFlight()`\n\n- Area: Sessions\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}