-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
runEmbeddedPiAgent (cron path) does not pass allowEmptyAssistantReplyAsSilent for delivery.mode === "none" jobs #79069
Copy link
Copy link
Closed
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
runEmbeddedPiAgent (cron path) does not pass
allowEmptyAssistantReplyAsSilentfordelivery.mode === "none"jobsBug type
Reliability / silent-turn handling regression in cron path.
Summary
Cron jobs configured with
delivery.mode === "none"— i.e. jobs whose successful path is intentionally silent — produce false[agent/embedded] incomplete turn detected: stopReason=stop payloads=0warnings whenever the assistant ends a turn with an empty final message. The cron call site ofrunEmbeddedPiAgent({...})does not passallowEmptyAssistantReplyAsSilentto the runtime, so the runtime correctly classifies the empty-final-payload outcome as an incomplete turn even though the job was configured to permit silent success.This is structurally the same seam #74409 fixed for the chat-reply (
get-reply.ts) path:allowEmptyAssistantReplyAsSilentis computed correctly elsewhere but not threaded through to a sibling call site. #74409 dropped theisGroupChat &&short-circuit for direct chats; this report covers a different sibling — the embedded cron-execution path.Version
Observed on
openclaw 2026.5.4. Inspected sandbox tarballs of2026.5.5,2026.5.6, and2026.5.7-beta.1confirm the same seam is unchanged in all three:runEmbeddedPiAgent({...})in the cron execution path does not includeallowEmptyAssistantReplyAsSilentin its argument object.Code seam (current bundled output, 2026.5.4)
/dist/run-executor.runtime-CmvK87iL.js(in 2026.5.6 the bundle isrun-executor.runtime-iZ2r0NUv.js; in 2026.5.7-beta.1 the bundle isrun-executor.runtime-iZ2r0NUv.jsalso — byte-identical). The relevantrunEmbeddedPiAgentcall site:Repro shape
A minimal cron
agentTurnjob whose successful path produces an empty final assistant message — for example:{ "kind": "agentTurn", "message": "Run the package detector skill (silent on no detection):\n...\nReply silently if nothing detected.", "model": "openai-codex/gpt-5.5", "timeoutSeconds": 60 }with the cron entry's
delivery.mode === "none"(silent delivery). When the model finishes withstopReason: "stop"and an empty final assistant message:The job was configured to be silent on success, but the runtime treats the empty-final-payload outcome as an incomplete turn because
allowEmptyAssistantReplyAsSilentwas never passed.Expected behavior
When the cron job's
delivery.mode === "none", the call torunEmbeddedPiAgentshould passallowEmptyAssistantReplyAsSilent: true, so that an empty final assistant payload is correctly classified as a silent success rather than an incomplete turn.Actual behavior
The cron call site never sets
allowEmptyAssistantReplyAsSilent. The runtime defaults it tofalse, and every silent cron job with an empty final assistant message produces a false-positive "incomplete turn detected" warning surfaced to the user.Proposed fix (minimal)
Add a single line to the
runEmbeddedPiAgent({...})argument object in the cron execution path. The condition mirrors how delivery mode is resolved elsewhere in the same path — accept either the resolved or the raw job-level delivery mode, since both forms appear depending on which cron entry seam invoked the runner:const result = await runEmbeddedPiAgent({ /* ... */ abortSignal: params.abortSignal, onExecutionStarted: params.onExecutionStarted, bootstrapPromptWarningSignaturesSeen, - bootstrapPromptWarningSignature + bootstrapPromptWarningSignature, + allowEmptyAssistantReplyAsSilent: params.resolvedDelivery?.mode === "none" || params.job?.delivery?.mode === "none" });(The TypeScript source seam is in the cron execution path corresponding to bundled
run-executor.runtime-*.js— the same call site that already threadsbootstrapPromptWarningSignature.)Validation locally
The patched form has been running locally on
2026.5.4since 2026-05-04. After the fix:delivery.mode === "none") with empty final assistant messages no longer produce[agent/embedded] incomplete turn detected: ... payloads=0warningsdelivery.mode !== "none") are unaffected (the runtime keeps its existing incomplete-turn detection for those)Related work
allowEmptyAssistantReplyAsSilentgating for direct chats inget-replypath. Same parameter, different sibling call site. This report covers the cron sibling.NO_REPLYtool results as incomplete when the final assistant message is empty #68452 (CLOSED 2026-04-27): fixed cronNO_REPLYtool-result detection. Adjacent but different seam — that fix synthesizes silent payloads from tool results; this report is about the prior step where the runtime classifier should accept empty assistant replies as silence when configured.Severity
Low individual impact (warning, not a hard failure), but high noise: every silent cron job with an empty assistant final message produces a user-facing warning, training operators to ignore real incomplete-turn signals.
Why I think this should be a separate tracked bug
#74409 closed the chat-channel sibling but didn't sweep the cron sibling. The cron-path fix is a one-line addition at a different call site and has a distinct test surface (no chat-channel coverage applies).