Summary
When a cron job has delivery.to configured to target a specific Telegram topic (e.g. 63448508:topic:1234), the message is delivered to the last active topic (the most recent thread from session history) instead of the configured one. The :topic: suffix in delivery.to is never parsed, so the explicitly configured messageThreadId is lost and replaced by whatever thread was last active in the session.
Steps to reproduce
- Create a cron job with
delivery.to = "63448508:topic:1234" and delivery.channel = "telegram"
- Have a conversation in a different topic (e.g. topic 5678) so it becomes the last active one
- Wait for the cron job to fire
- The message appears in topic 5678 (last active), not in topic 1234 (configured)
Expected behavior
The cron delivery should parse :topic:NNN from the to field, extract the messageThreadId, and deliver to the configured topic thread — regardless of which topic was last active.
Actual behavior
:topic:NNN is not parsed in resolveSessionDeliveryTarget(). The delivery falls back to lastThreadId from session history, which points to whichever topic had the most recent conversation — not the one specified in the cron config.
Environment
lobster-biscuit
Summary
When a cron job has
delivery.toconfigured to target a specific Telegram topic (e.g.63448508:topic:1234), the message is delivered to the last active topic (the most recent thread from session history) instead of the configured one. The:topic:suffix indelivery.tois never parsed, so the explicitly configuredmessageThreadIdis lost and replaced by whatever thread was last active in the session.Steps to reproduce
delivery.to = "63448508:topic:1234"anddelivery.channel = "telegram"Expected behavior
The cron delivery should parse
:topic:NNNfrom thetofield, extract themessageThreadId, and deliver to the configured topic thread — regardless of which topic was last active.Actual behavior
:topic:NNNis not parsed inresolveSessionDeliveryTarget(). The delivery falls back tolastThreadIdfrom session history, which points to whichever topic had the most recent conversation — not the one specified in the cron config.Environment
lobster-biscuit