Isolated cron runs leak context when they reuse a stable session key Different isolated…
- User
Isolated cron runs leak context when they reuse a stable session key
Different isolated cron runtime sessions that reuse a stable session key must not share active LCM context. Prior runs remain archived, compaction within the current run still works, and ordinary non-cron session continuity is unchanged.
Interface
No new public interfaces are introduced.
- Assistant
I’ll trace how runtime session identity maps to active LCM context, then add a focused regression test and the smallest internal isolation fix. I’ll also check release-note requirements since this changes user-visible behavior.
- Assistant
The leak comes from the key-first lookup rule: it intentionally preserves normal chat continuity, but cron keys need a narrower identity of
(sessionKey, runtime sessionId). I’m applying that exception centrally so a new cron run archives the old row, while all operations inside one runtime still resolve the same active row. - Assistant
The regression now covers two cron invocations with the same key, verifies the first is archived and the second contains only its own messages, and confirms forced compaction targets the second run’s conversation. Targeted tests and type checking are running now.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.