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 session/context identity through the cron path, add a regression test for stable-key reuse, then implement the narrowest isolation fix and run the relevant suite.
- Assistant
rgisn’t installed in this workspace, so I’m using targetedfind/grepsearches instead. I’m focusing first on where runtime session IDs are mapped to persisted LCM conversations. - Assistant
The leak is in stable-key resolution: the store intentionally prefers
sessionKeyand rewrites the active row’s runtimesessionId, which is correct for normal sessions but wrong for isolated cron runs. I’m adding a cron-specific runtime-boundary rotation while leaving the general stable-key continuity logic untouched. - Assistant
The regression now covers the full contract: the prior cron conversation is archived with its messages intact, the new run assembles only its own context, repeated turns in that run stay continuous, and its compaction path still resolves the current conversation. I also added the required patch changeset because this changes user-visible behavior.
- Assistant
The targeted regression, TypeScript check, and full suite are green (1,068 tests). I’m doing the final build and diff review now, especially checking that no ordinary stable-session behavior was altered.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.