Group of 2 Under the hood
Pending artifact auto-reply handoffs are now capped, evicted, and swept for stale entries even when auto-reply is off
What
- A new
handOffsmap tracks pending handoffs (used for artifact auto-reply) keyed by uuid, capped at 64 entries with LRU-style eviction, evicting the oldest entry that isn't among currently live sessions. - New sweep logic declines stale handoffs with reason
auto_reply_offwhen auto-reply is turned off, and drops handoffs per-slug when the owning session no longer exists. - Artifact comment and db-read action handlers now call this sweep on every read, not just when auto-react/reply is enabled.
Why This prevents stale or orphaned handoff entries from accumulating unboundedly and ensures they get cleaned up consistently, regardless of whether auto-reply is currently turned on.