-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Cron delivery: synthesized "(agent) failed" summary paraphrases bash into garbled "step list" #87426
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
When a cron job's agent turn ends with
status: errorand no final assistant message, the cron-delivery layer synthesizes a fallback summary by paraphrasing the failingbashtool invocation into a stepwise English list (e.g.create folder X → run then set → run [ → run jq → run true) fi …). The synthesized string is then announced verbatim to the configured channel (Discord, in my case). The result reads as gibberish even though the underlying failure (e.g., a webhook returning HTTP 500) is legitimate and worth surfacing.Repro
delivery.mode: "announce"(Discord).bashtool call with a multi-line script that includes shell control-flow keywords (if,then,fi,set,[,jq, etc.).set +e; …; exit 0safety wrap, and have the model end the turn without producing a final assistant message.Observed
Sample Discord messages from one job (
8fbdb11f-…, modelgpt-5.5viaopenai-codex):2026-05-20 17:01 PT—⚠️ 🛠️ `show > → run f, → run your (agent)` failed2026-05-20 20:01 PT—⚠️ 🛠️ `create folder ~/.openclaw/workspace/.tmp → run f, → run s official → run your (agent)` failed2026-05-21 11:00 PT—⚠️ 🛠️ `create folder ~/.openclaw/workspace/.tmp → run then set → run true set → run [ → run then -> run jq → run true) fi → run python3 scripts/birdweather.py -> run sed transform (+2 steps) → run true) cat (agent)` failed2026-05-21 22:00 PT(different job) —⚠️ 🛠️ `run for sub → run do printf → fetch https://www.reddit.com/r/\$sub/hot.json?limit=25 -> run jq → run done (agent)` failedEach shell keyword (
then,set,[,fi,jq,true) in the original bash gets emitted as its own→ run Xstep. The leadingmkdir -p .tmpcorrectly paraphrases tocreate folder ~/.openclaw/workspace/.tmp, but everything after that is just whitespace-tokenized shell keywords.The corresponding session trajectories (
agents/main/sessions/<sid>.trajectory.jsonl) show 2–5 normal tool calls, noassistant.messageevent, and the turn ending without a wrap-up.Expected
When the failing tool is
bash/shell/equivalent, skip the natural-language paraphraser and emit something like:The paraphraser may still be useful for higher-level tools where verbs map cleanly (file_write, web_fetch, etc.). For raw shell it produces no value and actively misleads.
Why this matters
Two effects compound:
Workaround
Harden the cron job's prompt so the agent (a) wraps inner failure-prone bash with
set +e; …; exit 0so the turn-level status staysok, and (b) always emits a final assistant message even on internal failure. That sidesteps the paraphraser entirely. Doing this in my own job's prompt eliminates the garbled DMs locally, but the underlying paraphraser bug remains for anyone who hasn't hardened their prompts.Environment
2026.5.26gpt-5.5Issue drafted with assistance from Claude (Anthropic) per CONTRIBUTING.md AI-disclosure guidance; repro evidence and proposed fix are from local trajectory data.