Everything else · Published October 3, 2026
Recording every message in real time without delays
Messages were delayed due to long turns
The situation
A system was designed to record messages, but it only recorded them when a turn ended, causing delays. A person experienced this issue when their messages were recorded three hours late. The system had a mechanism to record messages, but it was not running frequently enough to capture messages in real time. The person needed to find a way to record every message without delays. The current system had a sweep mechanism that ran on every event, but it only read harnesses marked as sweep. A wake-sessions helper was also available to run handlers beside it.
What they weighed
Read every harness's transcripts that hold rows past their cursor
Make the prompt-time hook send queued prompts immediately
Create a second mechanism to run the sweep
What they decided
Read every harness's transcripts that hold rows past their cursor
Why
The sweep, cursor, and drain lock already existed, so reading every chat that was behind its cursor on every event and every few minutes from the wake-sessions helper could close the delay without a second mechanism. This approach would also avoid duplicating the helper and ensure that no messages were missed. The existing mechanism was not running frequently enough, but widening its scope could solve the issue.
The first step
Implement the widened sweep mechanism, add a new handler to run it every few minutes, and backfill the last week of data to test its effectiveness. Then, verify that a message typed into a busy turn is recorded within a few minutes.
How they would know it worked
An audit of the last week shows no missing transcript person messages, and a message typed into a busy turn is recorded within a few minutes.
How it turned out
Not known yet. The result is added here when it comes in.
Shared by the person who made this decision. Names, places, dates and numbers were removed before it was published.