fix(cron): mirror direct cron deliveries into destination sessions#74913
fix(cron): mirror direct cron deliveries into destination sessions#74913yfge wants to merge 3 commits into
Conversation
|
Thanks for the context here. I did a careful shell check against current Current main already implements the useful change through the merged cron destination-session mirror work, with a broader and safer implementation than this branch. This PR branch still lacks its own real behavior proof and is now conflicted/superseded by the landed current-main path. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the current-main implementation from the merged replacement PR and close this narrower conflicted branch rather than trying to land it separately. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection and current regression tests show the reproduction path: custom Is this the best way to solve the issue? Yes for current main, not for this branch. The merged replacement is the better solution because it resolves destination sessions, bootstraps outbound session metadata, keeps mirror failure best-effort, and preserves text in mixed media cases. Security review: Security review cleared: The PR diff only touches cron delivery code, focused tests, and changelog text; I found no dependency, workflow, secret, package, release, or third-party execution change. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against a6aa48350b7e; fix evidence: commit 7de413499f1b, main fix timestamp 2026-05-15T17:49:30Z. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
|
This looks like the right small surface to land first. Mirroring the delivered text, not the whole isolated run transcript, is the important part: it keeps the worker context boundary intact while making the user-visible result part of the destination session. One thing I'd keep in the tests if this evolves: assert the follow-up session sees the exact fallback/direct delivery text that the user saw, rather than the worker's scratch output. That avoids a class of "it is in memory, but not the same message the user received" bugs. This also gives #74286 a clean decomposition: parent rewrite grounding can be fixed separately, while this PR handles the persistent destination transcript side. |
Summary
Background
openclaw cron runcould announce into the requested external channel while skipping the destinationsession:<id>transcript mirror, so the agent forgot the message it had just sent.Changes
session:<id>cron delivery so the outbound context and mirror both point at the destination session.Validation
pnpm exec oxfmt --check --threads=1 src/cron/isolated-agent/delivery-dispatch.ts src/cron/isolated-agent/delivery-dispatch.double-announce.test.tspnpm test src/cron/isolated-agent/delivery-dispatch.double-announce.test.tsImpact
--session session:<id>now leave the delivered assistant reply in the same persistent session transcript that users inspect later.