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 search the codebase for how isolated cron runs, session keys, and LCM context interact.
- Assistant
Implementing isolated-cron session rotation: adding detection in
session-patterns.tsand wiring it into the engine lifecycle. - Assistant
Assemble needs a replacement conversation created at rotation time, since it doesn't ingest like afterTurn.
- Assistant
Fixing the session-key pattern:
agent:*:cron:**was matching stable keys because**can match empty. - Assistant
Forked cron with a stable key still hits ambiguous rollover. Adding a parentSession exemption so fork continuity is preserved.
- Assistant
Isolated cron runs that reuse a stable session key (e.g.
agent:main:cron:nightly) no longer inherit the prior run’s active LCM context.Problem
OpenClaw isolated cron lanes reuse a stable
sessionKeyacross runs, but each run gets a new runtimesessionId. LCM’s session-key continuity logic was reattaching the new runtime to the previous run’s active conversation, leaking summaries and context.Fix
-
isStableIsolatedCronSessionKey()insession-patterns.ts— identifies stable cron keys (agent:*:cron:<job>) and excludes per-run keys (agent:*:cron:<job>:run:*). -
rotateIsolatedCronSessionKeyConversationIfNeeded()in — when a new runtime session arrives on a stable isolated cron key:
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.