Files
openclaw/src
Yuval DinodiaandTak Hoffman b3fbe6f5d7 fix(gateway): keep uncommitted generated media while its session run is live (#119764)
…is live

Generated assistant media is stored with a null messageId and a transient
retention class until the assistant turn commits its transcript message and
attaches the record. The managed outgoing media GC reaped transient records
purely by age, so any turn still in flight past the 15 minute TTL had its
media records and files deleted before finalization; the later attach is
silently ineffective and the committed message keeps a permanently dead
media URL.

Cleanup now accepts a hasActiveSessionRun probe and skips the transient age
reap while the owning session still has a registered chat run. Both GC entry
points, the chat.history sweep and the maintenance sweep, supply the probe
from the gateway's registered chat run map, which spans admission through
finalization. Sessions without a live run keep the existing TTL behavior.

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-05 23:13:38 -05:00
..
…
…
…
…
…
…
…
…
…