openclaw - ✅(Solved) Fix [Bug]: Discord announce removing fields from my input [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#58535Fetched 2026-04-08 02:01:26
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

I have a cron job running that specifically says 'Output this file verbatim' - the file is generated by a system cron 5 minutes before that, simply because it was timing out when being run by openclaw cron itself as it takes about 3 minutes to run.

The contents of the file:

5. [article] Major explosion at Russian petrochemical plant | Al Jazeera
Match type: Theme watch
Theme: Russian plant explosion
Impact: Unclear
Confidence: Medium
Why: Major explosion reported at a Russian petrochemical plant, potentially linked to sabotage or accident. Could disrupt energy supplies and heighten tensions in ongoing geopolitical conflicts.
Link: <LINK TO ARTICLE>
Source: Al Jazeera [geopolitics]

But the output I am getting on Discord:

5. Major explosion at Russian petrochemical plant | Al Jazeera
Impact: Unclear
Confidence: Medium
Summary: A significant explosion at a Russian petrochemical plant raises concerns about potential sabotage or accidents, possibly disrupting energy supplies. 
Read More (Which is a link)

So it's removing two of my fields and the category of the source! I could change it to a webhook as that supposedly has no formatting layer but I do like the way it changes the link. I cannot find any docs and ChatGPT is tryng to force me to swap to a webhook. Anybody know what's going on?

Root Cause

I have a cron job running that specifically says 'Output this file verbatim' - the file is generated by a system cron 5 minutes before that, simply because it was timing out when being run by openclaw cron itself as it takes about 3 minutes to run.

PR fix notes

PR #1: fix(cron): preserve all fields in announce delivery by removing summarization instruction

Description (problem / solution / changelog)

Summary

  • Problem: appendCronDeliveryInstruction() told the cron agent to "Return your summary as plain text" — the word "summary" caused LLMs to condense and reformat structured output non-deterministically, dropping fields on delivery.
  • Why it matters: Any user with a structured cron job using --announce saw random field loss every run. Non-deterministic because different inference runs interpret "summary" differently.
  • What changed: Changed "summary" → "response" in appendCronDeliveryInstruction() in src/cron/isolated-agent/run.ts, and added explicit instruction to reproduce all fields exactly.
  • What did NOT change: Delivery flow, session routing, announce mode behavior, anything outside that one function.

Change Type

  • Bug fix

Scope

  • Gateway / orchestration

Linked Issue/PR

  • Closes #58535
  • This PR fixes a bug or regression

Root Cause

  • Root cause: The prompt instruction used the word "summary", which LLMs interpret as a directive to condense/reformat rather than reproduce faithfully.
  • Missing detection / guardrail: No test asserted the exact wording of the delivery instruction or guarded against summarization language.
  • Contributing context: Non-deterministic field dropping made this hard to pin down — different runs dropped different fields.

Regression Test Plan

  • Coverage level: [x] Unit test
  • Target test: src/cron/isolated-agent/run.message-tool-policy.test.ts
  • Scenario: 3 new tests in "runCronIsolatedAgentTurn delivery instruction" describe block — (1) instruction present when delivery requested, (2) instruction absent when not requested, (3) prompt never contains /\bsummary\b/i when delivery requested.
  • Why smallest reliable guardrail: directly asserts the prompt text seen by the agent, which is the exact failure point.

User-visible / Behavior Changes

Cron jobs with --announce now reproduce all output fields faithfully instead of condensing to a summary.

Diagram

Before:
prompt → "Return your summary as plain text" → LLM condenses → missing fields in Discord

After:
prompt → "Return your response as plain text" → LLM reproduces faithfully → all fields in Discord

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Ubuntu 24.04 / Arch Linux
  • Model: GPT-4o / claude-sonnet-4-6
  • Integration/channel: Discord (announce mode)

Steps

  1. Create cron job: openclaw cron add --message "Field1: A, Field2: B, Field3: C, Field4: D, Field5: E, Field6: F, Field7: G" --every 1m --announce --channel discord
  2. Wait for delivery
  3. Count fields in Discord message

Expected

All fields appear verbatim.

Actual (before fix)

3–4 fields appear, rest dropped. Formatting varies per run.

Evidence

  • Failing test/log before + passing after — regression test added guards against summary word
  • Human verified end-to-end Discord delivery with all 6 fields intact
<!-- Add screenshots here: before (fields dropped) and after (all fields intact) -->

Human Verification

  • Verified: end-to-end cron job delivery to Discord DM — all 6 structured fields arrived intact
  • Verified: pnpm build && pnpm check && pnpm test all green (750 tests)
  • Edge cases checked: delivery instruction absent when deliveryRequested: false, no regression on heartbeat-only skip logic
  • Did NOT verify: other channel adapters (Telegram, Slack) — change is channel-agnostic (prompt text only)

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: Changing prompt wording could affect edge cases where agents need to format output differently.
    • Mitigation: The change is minimal ("summary" → "response") and adds explicit "do not summarize" instruction, which is strictly more correct.

Changed files

  • src/cron/isolated-agent/run.message-tool-policy.test.ts (modified, +68/-0)
  • src/cron/isolated-agent/run.ts (modified, +1/-1)

PR #65638: fix(cron): preserve all fields in announce delivery by removing summarization instruction

Description (problem / solution / changelog)

Summary

  • Problem: appendCronDeliveryInstruction() told the cron agent to "Return your summary as plain text" — the word "summary" caused LLMs to condense and reformat structured output non-deterministically, dropping fields on delivery.
  • Why it matters: Any user with a structured cron job using --announce saw random field loss every run. Non-deterministic because different inference runs interpret "summary" differently.
  • What changed: Changed "summary" → "response" in appendCronDeliveryInstruction() in src/cron/isolated-agent/run.ts, and added explicit instruction to reproduce all fields exactly.
  • What did NOT change: Delivery flow, session routing, announce mode behavior, anything outside that one function.

Change Type

  • Bug fix

Scope

  • Gateway / orchestration

Linked Issue/PR

  • Closes #58535
  • This PR fixes a bug or regression

Root Cause

  • Root cause: The prompt instruction used the word "summary", which LLMs interpret as a directive to condense/reformat rather than reproduce faithfully.
  • Missing detection / guardrail: No test asserted the exact wording of the delivery instruction or guarded against summarization language.
  • Contributing context: Non-deterministic field dropping made this hard to pin down — different runs dropped different fields.

Regression Test Plan

  • Coverage level: [x] Unit test
  • Target test: src/cron/isolated-agent/run.message-tool-policy.test.ts
  • Scenario: 3 new tests in "runCronIsolatedAgentTurn delivery instruction" describe block — (1) instruction present when delivery requested, (2) instruction absent when not requested, (3) prompt never contains /\bsummary\b/i when delivery requested.
  • Why smallest reliable guardrail: directly asserts the prompt text seen by the agent, which is the exact failure point.

User-visible / Behavior Changes

Cron jobs with --announce now reproduce all output fields faithfully instead of condensing to a summary.

Diagram

Before:
prompt → "Return your summary as plain text" → LLM condenses → missing fields in Discord

After:
prompt → "Return your response as plain text" → LLM reproduces faithfully → all fields in Discord

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Ubuntu 24.04 / Arch Linux
  • Model: GPT-4o / claude-sonnet-4-6
  • Integration/channel: Discord (announce mode)

Steps

  1. Create cron job: openclaw cron add --message "Field1: A, Field2: B, Field3: C, Field4: D, Field5: E, Field6: F, Field7: G" --every 1m --announce --channel discord
  2. Wait for delivery
  3. Count fields in Discord message

Expected

All fields appear verbatim.

Actual (before fix)

3–4 fields appear, rest dropped. Formatting varies per run.

Evidence

  • Failing test/log before + passing after — regression test added guards against summary word
  • Human verified end-to-end Discord delivery with all 6 fields intact
<!-- Add screenshots here: before (fields dropped) and after (all fields intact) -->
  • Before the fix ( Some fields are dropped )
<img width="820" height="331" alt="before" src="https://github.com/user-attachments/assets/cac7951a-892a-4760-9094-c4a0e3966fd5" />
  • After the fix ( The fields persist in all announcements ) <img width="616" height="241" alt="after" src="https://github.com/user-attachments/assets/0a1fcc32-4053-4812-ba63-cc0ec114660f" />

Human Verification

  • Verified: end-to-end cron job delivery to Discord DM — all 6 structured fields arrived intact
  • Verified: pnpm build && pnpm check && pnpm test all green (750 tests)
  • Edge cases checked: delivery instruction absent when deliveryRequested: false, no regression on heartbeat-only skip logic
  • Did NOT verify: other channel adapters (Telegram, Slack) — change is channel-agnostic (prompt text only)

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: Changing prompt wording could affect edge cases where agents need to format output differently.
    • Mitigation: The change is minimal ("summary" → "response") and adds explicit "do not summarize" instruction, which is strictly more correct.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/cron/isolated-agent/run.message-tool-policy.test.ts (modified, +68/-0)
  • src/cron/isolated-agent/run.ts (modified, +1/-1)

Code Example

5. [article] Major explosion at Russian petrochemical plant | Al Jazeera
Match type: Theme watch
Theme: Russian plant explosion
Impact: Unclear
Confidence: Medium
Why: Major explosion reported at a Russian petrochemical plant, potentially linked to sabotage or accident. Could disrupt energy supplies and heighten tensions in ongoing geopolitical conflicts.
Link: <LINK TO ARTICLE>
Source: Al Jazeera [geopolitics]

---

5. Major explosion at Russian petrochemical plant | Al Jazeera
Impact: Unclear
Confidence: Medium
Summary: A significant explosion at a Russian petrochemical plant raises concerns about potential sabotage or accidents, possibly disrupting energy supplies. 
Read More (Which is a link)

---
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

I have a cron job running that specifically says 'Output this file verbatim' - the file is generated by a system cron 5 minutes before that, simply because it was timing out when being run by openclaw cron itself as it takes about 3 minutes to run.

The contents of the file:

5. [article] Major explosion at Russian petrochemical plant | Al Jazeera
Match type: Theme watch
Theme: Russian plant explosion
Impact: Unclear
Confidence: Medium
Why: Major explosion reported at a Russian petrochemical plant, potentially linked to sabotage or accident. Could disrupt energy supplies and heighten tensions in ongoing geopolitical conflicts.
Link: <LINK TO ARTICLE>
Source: Al Jazeera [geopolitics]

But the output I am getting on Discord:

5. Major explosion at Russian petrochemical plant | Al Jazeera
Impact: Unclear
Confidence: Medium
Summary: A significant explosion at a Russian petrochemical plant raises concerns about potential sabotage or accidents, possibly disrupting energy supplies. 
Read More (Which is a link)

So it's removing two of my fields and the category of the source! I could change it to a webhook as that supposedly has no formatting layer but I do like the way it changes the link. I cannot find any docs and ChatGPT is tryng to force me to swap to a webhook. Anybody know what's going on?

Steps to reproduce

  1. Create cron to output the input above to announce on Discord.

Expected behavior

Output all of my input and not strip any.

Actual behavior

Strips two fields from my input.

OpenClaw version

2026.3.28

Operating system

Ubuntu 24.04

Install method

OpenClaw official install script

Model

GPT-4o

Provider / routing chain

openclaw -> cron -> discord announce

Additional provider/model setup details

Discord is setup with as a bot and the announce channel is set to a serverid/chatid.

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can be resolved by using a webhook instead of the announce command to output the file contents to Discord, as the announce command seems to have a formatting layer that strips certain fields.

Guidance

  • The announce command is likely stripping the fields due to its built-in formatting layer, which is not fully documented.
  • Using a webhook might be a viable workaround, as it supposedly has no formatting layer and would preserve the original output.
  • Before switching to a webhook, verify that the announce command is indeed the cause of the issue by testing it with a different output format.
  • Check the OpenClaw documentation and Discord API documentation for any mentions of formatting limitations or workarounds for the announce command.

Example

No code example is provided as the issue is more related to the configuration and usage of the announce command rather than a code-specific problem.

Notes

The OpenClaw version and Discord setup might be relevant to the issue, but without further documentation or logs, it's difficult to determine the exact cause. The user's concern about losing the link formatting when switching to a webhook is valid and should be considered when deciding on a solution.

Recommendation

Apply workaround: Use a webhook to output the file contents to Discord, as it seems to be a more reliable method for preserving the original output format. This is recommended because the announce command's formatting layer is not well-documented and might be causing the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Output all of my input and not strip any.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING