Skip to content

v1.15.2 ·

The notes nobody threw away

When a coding session starts, the tool writes a small note: this session is open, working in this project. The note answers one question later. When the session says it is now working on the login feature, which session was that? Get it right and the cost lands on the login feature. Get it wrong and it lands nowhere.

Nothing ever tore the note up. The only way one disappeared was a timer that swept notes after forty-eight hours. Sessions last an afternoon, so an ordinary week left a pile of notes for closed sessions, indistinguishable from a pile of sessions all open at once.

That collided with a rule that is right on its own: when more than one session could be the asker, refuse to guess. A wrong label is worse than a missing one, because a missing one announces itself. So the tool declined, and fell back to a made-up identity and a weaker method that matches sessions to work by overlapping times.

The feature switched itself off in about a day. I counted my own pile on the day I wrote the fix: eighteen notes, three from sessions actually running. In the same week, four hours of one session's work was recorded and priced accurately, then filed under no feature, because nothing could say which session produced it.

The reproduction took two minutes. Start two sessions, ask which is which, and the tool declines. End one the proper way, and it still declines, because ending a session was never wired to remove its note. Delete one note by hand and the answer is immediate and correct. The rule was fine. It was being handed fifteen wrong answers.

What changed

A session that ends now removes its own note straight away. A note left by a session that never said goodbye, because the window closed or the machine restarted, is judged on signs of life. A running session leaves a trail, so a note whose trail has been silent for thirty minutes is not describing an asker.

Two sessions that are both live still produce no answer. Nothing here changes that.

Why this way

There were two questions, and one rule had been answering both. Which notes to delete is about tidiness and can be slow and cautious. Which notes to consider right now is about accuracy and should be strict. Deletion stays on the forty-eight hour timer. Candidacy uses the thirty-minute window.

I turned down a shorter timer, because deletion has to be safe for the longest session, and one left open over a weekend is legitimate. I turned down ending-only removal, which covers only the sessions that end politely. And I turned down breaking ties by picking the busiest session.

Not every assistant leaves a trail, so no trail is not read as dead. A note that never promised one is left to the generous timer. A note that promised one and cannot produce it is judged on its age.

Existing installs should not stay broken until someone re-runs setup. So the tool recognizes a session end from the flag or from hook_event_name: "SessionEnd" in the payload the platform already sends. aidlc doctor gains a migration that reinstalls a hook whose command is out of date.

What it costs

Going back to an older version needs aidlc cost hooks install run once. The older version does not recognize the newer instruction and refuses it.