Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
An isolated scheduled agentTurn recovered from an early missing-file tool error, produced final assistant output, and ended successfully, but cron finalization treated the earlier tool error as fatal and skipped delivery before dispatchCronDelivery(...) was reached.
Steps to reproduce
The original issue was first observed in a natural scheduled run. I later reproduced the same state with a reduced one-shot scheduled isolated agentTurn. The reduced repro below was a real scheduled at run, not a manual rerun.
-
Configure an isolated scheduled agentTurn cron job with direct delivery enabled.
In my repro, the delivery target was a Feishu direct message with bestEffort=true.
-
Use a prompt that intentionally triggers an early recoverable missing-file tool error, then continues and produces a final assistant message.
Minimal prompt shape:
1. First run:
sed -n '1,20p' memory/repro-cron-delivery-skip-2026-06-19.md
2. If the file is missing, treat it as recoverable and continue.
3. Create memory/repro-cron-delivery-skip-2026-06-19.md.
4. Final output exactly:
REPRO_FINAL_OUTPUT_PRESENT
-
Let the job run through the scheduler.
In my repro, this was a one-shot scheduled run:
schedule: one-shot at 2026-06-19T14:45:03+08:00
sessionTarget: isolated
delivery: Feishu direct announce, bestEffort=true
-
Inspect the isolated session trajectory.
The expected trajectory shape for the repro is:
early tool.result:
name: bash
status: failed
isError: true
output: sed: can't read memory/repro-cron-delivery-skip-2026-06-19.md: No such file or directory
later tool.result:
name: apply_patch
status: completed
isError: false
model.completed:
assistantTexts: ["REPRO_FINAL_OUTPUT_PRESENT"]
session.ended:
status: success
-
Inspect the outer cron run record.
In the reproduced case, the isolated session succeeded and final assistant output existed, but the outer cron run was recorded as an error and delivery was not performed:
status: error
error: "⚠️ 🛠️ print lines 1-20 from memory/repro-cron-delivery-skip-2026-06-19.md (agent) failed"
delivered: false
deliveryStatus: "not-delivered"
deliveryError: same early tool error
delivery.resolved.ok: true
delivery.resolved.channel: "feishu"
delivery.fallbackUsed: false
-
Confirm the key reproduced state:
isolated session ending: success
final assistant output: present
delivery.resolved.ok: true
delivery.fallbackUsed: false
deliveryStatus: not-delivered
final output was not delivered
This reproduces the pre-dispatch delivery skip with a minimal scheduled isolated agentTurn, so the issue does not appear to be specific to the original complex maintenance prompt.
Expected behavior
If an isolated scheduled agentTurn recovers from a non-terminal tool error, produces final assistant output, and ends with status=success, the final assistant output should still be eligible for delivery dispatch.
A recovered earlier tool error should not by itself prevent the run from reaching dispatchCronDelivery(...).
At minimum, if OpenClaw intentionally skips delivery because a structured agent error is considered fatal, the cron run record should explicitly distinguish this from a delivery send failure, for example by recording that delivery was not attempted and why.
Actual behavior
The isolated agentTurn recovered from the early missing-file tool error, continued with later successful tool calls, produced final assistant output, and ended with status=success.
During cron finalization, the earlier recovered tool error was selected as the fatal run outcome. Because delivery had been requested, the cron runner returned before dispatchCronDelivery(...) was reached.
The outer cron run was recorded as:
status: error
summary/error: early missing-file tool error
delivered: false
deliveryStatus: "not-delivered"
deliveryError: same early tool error
delivery.resolved.ok: true
delivery.fallbackUsed: false
This was not a Feishu/API send failure. The delivery target was resolved, but delivery dispatch was not attempted, and the final assistant output was not delivered.
OpenClaw version
2026.6.6
Operating system
Ubuntu 22.04.5 LTS on WSL2
Install method
npm global
Model
gpt-5.5
Provider / routing chain
OpenClaw -> openai
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Original natural run evidence:
runAtIso: 2026-06-18T21:00:00.014+08:00
finishedAtIso: 2026-06-18T21:02:39.772+08:00
durationMs: 159751
model: gpt-5.5
provider: openai
status: error
error: "⚠️ 🛠️ print lines 1-260 from memory/2026-06-18.md (agent) failed"
summary: "⚠️ 🛠️ print lines 1-260 from memory/2026-06-18.md (agent) failed"
delivered: false
deliveryStatus: "not-delivered"
deliveryError: "⚠️ 🛠️ print lines 1-260 from memory/2026-06-18.md (agent) failed"
delivery.resolved.ok: true
delivery.resolved.channel: "feishu"
delivery.delivered: false
delivery.fallbackUsed: false
Original isolated session evidence:
tool call:
sed -n '1,260p' memory/2026-06-18.md
tool result:
sed: can't read memory/2026-06-18.md: No such file or directory
isError: true
later session behavior:
continued with later successful tool calls
created memory/2026-06-18.md
produced final assistant output
session ended with status=success
Reduced scheduled repro evidence:
cron job id: 0e015367-c53d-4569-a673-02e889584157
job name: repro-2026-06-19-cron-delivery-pre-dispatch-skip
schedule: one-shot at 2026-06-19T14:45:03+08:00
sessionTarget: isolated
delivery: Feishu direct announce, bestEffort=true
session id: e7ae707a-08db-47ae-ba02-dbe6209964da
Reduced repro cron run result:
runAtMs: 1781851503004
finishedAtMs: 1781851535307
durationMs: 32297
model: gpt-5.5
provider: openai
status: error
error: "⚠️ 🛠️ print lines 1-20 from memory/repro-cron-delivery-skip-2026-06-19.md (agent) failed"
summary: same as error
delivered: false
deliveryStatus: "not-delivered"
deliveryError: same early tool error
delivery.resolved.ok: true
delivery.resolved.channel: "feishu"
delivery.fallbackUsed: false
Reduced repro isolated session trajectory:
early tool.result:
name: bash
status: failed
isError: true
output: sed: can't read memory/repro-cron-delivery-skip-2026-06-19.md: No such file or directory
later tool.result:
name: apply_patch
status: completed
isError: false
model.completed:
assistantTexts: ["REPRO_FINAL_OUTPUT_PRESENT"]
session.ended:
status: success
Local code-path observation from the bundled build:
resolveCronPayloadOutcome(...)
detects hasFatalStructuredErrorPayload
if hasFatalStructuredErrorPayload && deliveryRequested:
build delivery trace with fallbackUsed=false
return resolveRunOutcome(...)
// dispatchCronDelivery(...) is not called
The important evidence for the pre-dispatch shape is:
isolated session ending: success
final assistant output: present
delivery.resolved.ok: true
delivery.fallbackUsed: false
deliveryError: earlier agent tool error, not a Feishu/API error
Impact and severity
Impact and severity
Affected:
Scheduled isolated agentTurn cron jobs that request delivery and contain a recoverable tool error before final assistant output.
Severity:
Medium to high for scheduled reporting/maintenance workflows.
Frequency:
Observed in the original natural scheduled run and reproduced with a reduced one-shot scheduled isolated agentTurn. A similar missing-date-file shape was also observed in an earlier local cron run of the same job class.
Consequence:
The user does not receive the final scheduled report even though the agent completed it. The run record also makes the event look like a generic not-delivered delivery failure, although delivery dispatch was not attempted.
Additional information
This is related to #94058 and #94116, but it is not the same failure shape.
#94058 describes the broader boundary problem where an isolated agentTurn can finish successfully while the outer cron run is recorded as error / not-delivered.
This report focuses on a narrower pre-dispatch case:
successful isolated agentTurn with final output
-> earlier recovered tool error selected as fatal during cron finalization
-> deliveryRequested branch returns before dispatchCronDelivery(...)
-> delivery is skipped before any Feishu/API send attempt
Suggested fixes:
- Persist a first-class
deliveryAttempted field in cron run records.
- Separate target resolution, delivery attempt, and delivery result in cron delivery state.
- Do not let a recovered non-terminal tool error suppress delivery when the isolated session ended successfully and final assistant output exists.
- If delivery is intentionally skipped because a structured agent error is treated as fatal, record
deliveryStatus=not-attempted or an equivalent explicit reason instead of generic not-delivered.
- Preserve or reference the final assistant output in run diagnostics even when the outer cron status is
error.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
An isolated scheduled
agentTurnrecovered from an early missing-file tool error, produced final assistant output, and ended successfully, but cron finalization treated the earlier tool error as fatal and skipped delivery beforedispatchCronDelivery(...)was reached.Steps to reproduce
The original issue was first observed in a natural scheduled run. I later reproduced the same state with a reduced one-shot scheduled isolated
agentTurn. The reduced repro below was a real scheduledatrun, not a manual rerun.Configure an isolated scheduled
agentTurncron job with direct delivery enabled.In my repro, the delivery target was a Feishu direct message with
bestEffort=true.Use a prompt that intentionally triggers an early recoverable missing-file tool error, then continues and produces a final assistant message.
Minimal prompt shape:
Let the job run through the scheduler.
In my repro, this was a one-shot scheduled run:
Inspect the isolated session trajectory.
The expected trajectory shape for the repro is:
Inspect the outer cron run record.
In the reproduced case, the isolated session succeeded and final assistant output existed, but the outer cron run was recorded as an error and delivery was not performed:
Confirm the key reproduced state:
This reproduces the pre-dispatch delivery skip with a minimal scheduled isolated
agentTurn, so the issue does not appear to be specific to the original complex maintenance prompt.Expected behavior
If an isolated scheduled
agentTurnrecovers from a non-terminal tool error, produces final assistant output, and ends withstatus=success, the final assistant output should still be eligible for delivery dispatch.A recovered earlier tool error should not by itself prevent the run from reaching
dispatchCronDelivery(...).At minimum, if OpenClaw intentionally skips delivery because a structured agent error is considered fatal, the cron run record should explicitly distinguish this from a delivery send failure, for example by recording that delivery was not attempted and why.
Actual behavior
The isolated
agentTurnrecovered from the early missing-file tool error, continued with later successful tool calls, produced final assistant output, and ended withstatus=success.During cron finalization, the earlier recovered tool error was selected as the fatal run outcome. Because delivery had been requested, the cron runner returned before
dispatchCronDelivery(...)was reached.The outer cron run was recorded as:
This was not a Feishu/API send failure. The delivery target was resolved, but delivery dispatch was not attempted, and the final assistant output was not delivered.
OpenClaw version
2026.6.6
Operating system
Ubuntu 22.04.5 LTS on WSL2
Install method
npm global
Model
gpt-5.5
Provider / routing chain
OpenClaw -> openai
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Impact and severity
Affected:
Severity:
Frequency:
Consequence:
Additional information
This is related to
#94058and#94116, but it is not the same failure shape.#94058describes the broader boundary problem where an isolatedagentTurncan finish successfully while the outer cron run is recorded aserror/not-delivered.This report focuses on a narrower pre-dispatch case:
Suggested fixes:
deliveryAttemptedfield in cron run records.deliveryStatus=not-attemptedor an equivalent explicit reason instead of genericnot-delivered.error.