fix: harden async media completion delivery

This commit is contained in:
Peter Steinberger
2026-05-05 06:13:14 +01:00
parent 349ce0056d
commit 6c8974f3f5
8 changed files with 138 additions and 8 deletions

View File

@@ -102,7 +102,7 @@ Not every agent run creates a task. Heartbeat turns and normal interactive chat
<Accordion title="Notify defaults for cron and media">
Main-session cron tasks use `silent` notify policy by default — they create records for tracking but do not generate notifications. Isolated cron tasks also default to `silent` but are more visible because they run in their own session.
Session-backed `music_generate` and `video_generate` runs also use `silent` notify policy. They still create task records, but completion is handed back to the original agent session as an internal wake so the agent can write the follow-up message and attach the finished media itself. Group/channel completions follow the normal visible-reply policy, so the agent uses the message tool when source delivery requires it.
Session-backed `music_generate` and `video_generate` runs also use `silent` notify policy. They still create task records, but completion is handed back to the original agent session as an internal wake so the agent can write the follow-up message and attach the finished media itself. Group/channel completions follow the normal visible-reply policy, so the agent uses the message tool when source delivery requires it. If the completion agent fails to produce message-tool delivery evidence in a tool-only route, OpenClaw sends the completion fallback directly to the original channel instead of leaving the media private.
</Accordion>
<Accordion title="Concurrent video_generate guardrail">

View File

@@ -93,7 +93,9 @@ id immediately, and tracks the job in the task ledger. The agent continues
responding to other messages while the job runs. When the provider finishes,
OpenClaw wakes the agent with the generated media paths so it can tell the
user and, when required by source-delivery policy, relay the result through
the message tool.
the message tool. For message-tool-only group/channel routes, OpenClaw treats
missing message-tool delivery evidence as a failed completion attempt and sends
the generated media fallback directly to the original channel.
## Speech-to-text and Voice Call

View File

@@ -16,7 +16,10 @@ For session-backed agent runs, OpenClaw starts music generation as a
background task, tracks it in the task ledger, then wakes the agent again
when the track is ready so the agent can tell the user and attach the
finished audio. In group/channel chats that use message-tool-only visible
delivery, the agent relays the result through the message tool.
delivery, the agent relays the result through the message tool. If the
completion agent writes only a private final reply, OpenClaw falls back to a
direct channel send with the generated media. The completion wake explicitly
warns the agent that normal final replies are private in those routes.
<Note>
The built-in shared tool only appears when at least one music-generation