fix(cron): disable messaging tool when delivery.mode is none#21896
Merged
Takhoffman merged 1 commit intoopenclaw:mainfrom Feb 28, 2026
Merged
Conversation
arosstale
approved these changes
Feb 20, 2026
Contributor
arosstale
left a comment
There was a problem hiding this comment.
Correct diagnosis and fix. deliveryRequested is false when mode=none, which left the messaging tool enabled — the agent could still send directly to the channel. The one-line change disables the tool for both cases. Test validates the delivery plan shape is correct.
|
This pull request has been automatically marked as stale due to inactivity. |
13d6a62 to
87ccc36
Compare
87ccc36 to
b22e04a
Compare
mrosmarin
added a commit
to mrosmarin/openclaw
that referenced
this pull request
Feb 28, 2026
* main: (31 commits) fix(browser): resolve correct targetId in navigate response after renderer swap (openclaw#25326) fix: sed escaping and UID mismatch in Podman Quadlet setup (openclaw#26414) fix(cron): pass heartbeat target=last for main-session cron jobs (openclaw#28508) (openclaw#28583) fix(cron): disable messaging tool when delivery.mode is none (openclaw#21808) (openclaw#21896) fix: clear delivery routing state when creating isolated cron sessions (openclaw#27778) fix(cron): avoid marking queued announce paths as delivered (openclaw#29716) fix(cron): enable completion direct send for text-only announce delivery (openclaw#29151) fix(cron): force main-target system events onto main session (openclaw#28898) fix(cron): condition requireExplicitMessageTarget on resolved delivery (openclaw#28017) feat(cron): add --account flag for multi-account delivery routing (openclaw#26284) fix: schedule nextWakeAtMs for isolated sessionTarget cron jobs (openclaw#19541) fix: sandbox browser docker no-sandbox rollout (openclaw#29879) (thanks @Lukavyi) GitHub: add regression bug issue template and routing (openclaw#29864) thanks @Takhoffman feat(feishu): add chat info/member tool (openclaw#14674) feat(feishu): add markdown tables, positional insert, color_text, and table ops (openclaw#29411) feat(feishu): add parent/root inbound context for quote support (openclaw#18529) fix: land android onboarding and voice reliability updates (openclaw#29796) fix(android-voice): rotate playback token per assistant reply fix(android-voice): retry talk config after transient failures fix(android-voice): cancel in-flight speech when speaker muted ...
newtontech
pushed a commit
to newtontech/openclaw-fork
that referenced
this pull request
Feb 28, 2026
nsd97
pushed a commit
to nsd97/openclaw
that referenced
this pull request
Feb 28, 2026
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Mar 1, 2026
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Mar 1, 2026
tuyunlei
added a commit
to tuyunlei/openclaw
that referenced
this pull request
Mar 1, 2026
Resolved conflicts:
- CHANGELOG.md: take upstream release notes
- extensions/feishu/src/{channel,reply-dispatcher,send}.ts: take upstream
(community replyInThread impl supersedes ours, PR openclaw#27325)
- src/agents/compaction.ts: merge timing logs with upstream
identifier preservation + buildCompactionSummarizationInstructions
- src/agents/pi-extensions/compaction-safeguard.ts: merge timing logs
with upstream summarizationInstructions param
- src/cron/isolated-agent/run.ts: merge upstream requireExplicitMessageTarget
condition (openclaw#28017) + disableMessageTool none-mode (openclaw#21896) with our
ownerNumbers + senderIsOwner additions
Post-merge fixes:
- Restore DEFAULT_CONTEXT_TOKENS import in attempt.ts (auto-merge dropped it)
- Adjust memory flush test to match our cache-stable systemPrompt design
(flush instructions in user prompt, not extraSystemPrompt)
18 tasks
ansh
pushed a commit
to vibecode/openclaw
that referenced
this pull request
Mar 2, 2026
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
safzanpirani
pushed a commit
to safzanpirani/clawdbot
that referenced
this pull request
Mar 2, 2026
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
sachinkundu
pushed a commit
to sachinkundu/openclaw
that referenced
this pull request
Mar 6, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
Mateljan1
pushed a commit
to Mateljan1/openclaw
that referenced
this pull request
Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
delivery.mode: "none"still deliver output to Telegram because the agent's messaging tool remains enabled.disableMessageToolinsrc/cron/isolated-agent/run.ts:494is set todeliveryRequested, which isfalsefor mode"none"— the agent retains the messaging tool and can send messages on its own.deliveryPlan.mode === "none".Fixes #21808
Problem
When a cron job has
delivery: { mode: "none" }, theresolveCronDeliveryPlan()function correctly returnsrequested: false(automatic delivery is suppressed). However, inrun.ts, thedisableMessageToolflag is derived solely fromdeliveryRequested:This means the agent's messaging tool stays enabled. The agent can autonomously send messages to Telegram via the messaging tool, defeating the purpose of
mode: "none".Before fix:
delivery.mode: "none"→deliveryRequested: false→disableMessageTool: falseChanges
src/cron/isolated-agent/run.ts— extenddisableMessageToolcondition to also checkdeliveryPlan.mode === "none"src/cron/delivery.test.ts— add regression test formode=nonedelivery plan resolutionAfter fix:
delivery.mode: "none"→disableMessageTool: trueTest plan
resolves mode=none with requested=false and no channel (#21808)oxlint --type-aware: 0 warnings, 0 errors)Effect on User Experience
Before: Cron jobs with
delivery.mode: "none"still send output to Telegram, forcing users to disable crons entirely to stop unwanted messages.After:
delivery.mode: "none"correctly silences cron output — the agent runs but cannot send messages to any channel.Greptile Summary
Fixes a bug where cron jobs configured with
delivery.mode: "none"would still send output to messaging channels (e.g., Telegram) because the agent's messaging tool was not disabled. The root cause was thatdisableMessageToolinrun.tswas only set based ondeliveryRequested(which isfalseformode: "none"), leaving the messaging tool active for the agent to use autonomously.src/cron/isolated-agent/run.ts: Extended thedisableMessageToolcondition fromdeliveryRequestedtodeliveryRequested || deliveryPlan.mode === "none", correctly silencing the agent when delivery is explicitly disabled.src/cron/delivery.test.ts: Added a regression test verifying thatmode=noneresolves withrequested: falseand no channel, while preserving thetofield.CHANGELOG.md: Added changelog entry under Fixes.Confidence Score: 5/5
disableMessageToolsemantics (when true, the message tool is omitted from the agent's tool list). A regression test is included. No risk of unintended side effects.Last reviewed commit: 13d6a62