Skip to content

Create cron-main-channel-targeting.md#91104

Closed
odeduxi wants to merge 1 commit into
openclaw:mainfrom
odeduxi:feature/cron-main-to-support
Closed

Create cron-main-channel-targeting.md#91104
odeduxi wants to merge 1 commit into
openclaw:mainfrom
odeduxi:feature/cron-main-to-support

Conversation

@odeduxi

@odeduxi odeduxi commented Jun 7, 2026

Copy link
Copy Markdown

Summary
What problem does this PR solve?
Cron jobs using sessionTarget: main have no way to specify a target delivery channel. For agents bound to multiple Slack channels, the output channel is non-deterministic — it depends on which channel last had activity in the main session. This makes reliable, channel-specific cron delivery impossible without switching to isolated mode.
Why does this matter now?
Multi-channel agents are a common pattern (e.g. a single agent serving several account channels). Without channel targeting in main mode, operators must choose between reply continuity (main) and delivery guarantees (isolated) — there is no option that provides both.
What is the intended outcome?
Support a to: field (or equivalent channel-targeting parameter) in sessionTarget: main cron job configuration, so the output is always delivered to the specified channel regardless of session history.
What is intentionally out of scope?
Changes to isolated mode behavior; changes to how replies are routed after delivery.
What does success look like?
A cron job configured with sessionTarget: main and a to: field consistently delivers its output to the specified channel, even when the agent is active in other channels.
What should reviewers focus on?
Whether the proposed to: parameter is the right API surface, or whether an alternative (e.g. delivery.channel unified across both session targets) is preferred.
───
Linked context
Which issue does this close?
Closes # (open a matching issue first if one doesn't exist, then link it here)
Which issues, PRs, or discussions are related?
Related # (link any Discord discussion or forum thread)
Was this requested by a maintainer or owner?
No — this is a community-raised limitation discovered in production use of multi-channel agents.
───
Real behavior proof (required for external PRs)
• Behavior or issue addressed: Cron job with sessionTarget: main delivering to the wrong Slack channel when agent is active in multiple channels
• Real environment tested: Self-hosted OpenClaw on AWS EC2, multiple Slack channels bound to a single agent
• Exact steps or command run after this patch: N/A — this is a feature proposal PR, no implementation patch included
• Evidence after fix: N/A
• Observed result after fix: N/A
• What was not tested: Full implementation — this PR proposes the feature; implementation and testing would follow maintainer feedback
• Proof limitations or environment constraints: This is a design/feature proposal. Real behavior proof will be added once an implementation approach is agreed upon.
───
Tests and validation
Which commands did you run? N/A — proposal only
What regression coverage was added or updated? None at this stage
What failed before this fix, if known? Cron output delivered to wrong channel in multi-channel agent setup
If no test was added, why not? No implementation yet — this PR is to propose and discuss the feature before writing code
───
Risk checklist
Did user-visible behavior change? No (proposal only)
Did config, environment, or migration behavior change? No
Did security, auth, secrets, network, or tool execution behavior change? No
What is the highest-risk area? Session routing logic for main mode cron jobs
How is that risk mitigated? To be determined by maintainers during design review
───
Current review state
What is the next action? Maintainer feedback on whether to: in main mode is the right approach, or if an alternative API is preferred
What is still waiting on? Maintainer input before any implementation begins
Which bot or reviewer comments were addressed? None yet — initial submission

@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 7, 2026
@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution. I reviewed the branch, and this PR is not a good landing base for OpenClaw.

Close: the useful cron targeting limitation is real, but this PR is not a mergeable fix because it only adds an unreferenced top-level proposal file and would not change cron routing behavior.

So I’m closing this PR rather than keeping an unmergeable branch open. A new narrow PR that carries only the useful part is welcome.

Review details

Best possible solution:

Close this proposal branch and continue the API discussion in the canonical cron output-routing issue, then accept a future focused implementation PR with schema, runtime, CLI/docs, tests, and redacted multi-channel proof.

Do we have a high-confidence way to reproduce the issue?

No live high-confidence reproduction was run. Source inspection does show the current limitation: main-session cron rejects non-webhook channel delivery config and uses heartbeat target: "last" rather than an explicit target field.

Is this the best way to solve the issue?

No. A top-level proposal file is not the best fix; maintainers should first choose the cron output-routing API, then review a focused implementation with real multi-channel proof.

Security review:

Security review cleared: The diff adds only Markdown proposal text and does not introduce executable code, dependencies, workflows, or secret-handling changes.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • steipete: GitHub path history shows multiple recent commits around cron delivery helpers, cron docs, validation, and SQLite cron persistence. (role: recent area contributor; confidence: medium; commits: 31ce6dfc4c70, 9d2c7bcb6655, 43121fb0968a; files: src/cron/service/jobs.ts, src/cron/delivery-plan.ts, docs/automation/cron-jobs.md)
  • mbelinky: Authored recent command-cron support touching the central cron service, timer, delivery-plan, and docs surfaces involved in cron output delivery. (role: feature contributor; confidence: medium; commits: b8adc11977ab; files: src/cron/service/jobs.ts, src/cron/service/timer.ts, src/cron/delivery-plan.ts)
  • obviyus: Recent history on src/cron/delivery-plan.ts includes cron delivery target preview and isolated message-target preservation work adjacent to explicit cron delivery routing. (role: adjacent delivery contributor; confidence: medium; commits: c18b6fc9da03, 7d9a9d83ffca; files: src/cron/delivery-plan.ts)
  • vincentkoc: Local blame for the current checkout's cron validation, timer, delivery-plan, and docs lines points through a recent current-main snapshot commit; this is useful routing evidence but likely not original authorship. (role: recent source carrier; confidence: low; commits: c60b42412482; files: src/cron/service/jobs.ts, src/cron/service/timer.ts, src/cron/delivery-plan.ts)

Codex review notes: model internal, reasoning high; reviewed against 37e3e895b020.

@clawsweeper clawsweeper Bot added the rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. label Jun 7, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 14, 2026
@clawsweeper

clawsweeper Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant