Skip to content

Cherry-pick e1df1c60b: fix: clear delivery routing state when creating isolated cron sessions#1513

Merged
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/e1df1c60b-clear-delivery-routing-isolated-cron
Mar 16, 2026
Merged

Cherry-pick e1df1c60b: fix: clear delivery routing state when creating isolated cron sessions#1513
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/e1df1c60b-clear-delivery-routing-isolated-cron

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Cherry-pick of upstream e1df1c60b — fix: clear delivery routing state when creating isolated cron sessions (openclaw#27778)

Clean apply, no conflicts.

Part of #681

openclaw#27778)

* fix: clear delivery routing state when creating isolated cron sessions

When `resolveCronSession()` creates a new session (forceNew / isolated),
the `...entry` spread preserves `lastThreadId`, `lastTo`, `lastChannel`,
and `lastAccountId` from the prior session. This causes announce-mode
cron deliveries to post as thread replies instead of channel top-level
messages when `delivery.to` matches the channel of a prior conversation.

Clear delivery routing metadata on new session creation so isolated
cron sessions start with a clean delivery state.

Closes openclaw#27751

✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)

* fix: also clear deliveryContext to prevent lastThreadId repopulation

normalizeSessionEntryDelivery (called on store writes) repopulates
lastThreadId from deliveryContext.threadId. Clearing only the last*
fields is insufficient — deliveryContext must also be cleared when
creating a new isolated session.

✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)

(cherry picked from commit e1df1c6)
@alexey-pelykh alexey-pelykh merged commit db6316b into main Mar 16, 2026
7 checks passed
@alexey-pelykh alexey-pelykh deleted the cherry-pick/e1df1c60b-clear-delivery-routing-isolated-cron branch March 16, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants