Describe the bug
When spawning sub-agents via sessions_spawn from a Telegram DM session and then sessions_yield, the completion announce back to the parent session is unreliable:
-
Pattern A (silent loss): Sub-agent completes successfully, but the parent session never wakes up. The user gets no notification. Only when the user manually sends a follow-up message does the parent realize the child finished.
-
Pattern B (duplicate delivery): Multiple sub-agent completion events queue up, then when the parent does wake (user sends a message), ALL queued completions are delivered at once — resulting in 3 replies for 3 sub-agents simultaneously.
Both patterns happen intermittently on the same setup with no config changes between them.
Environment
- OpenClaw: 2026.5.28 (e932160)
- OS: macOS 26.5.1 (arm64) — Mac mini M4
- Node: 26.0.0
- Channel: Telegram (direct DM, not group)
- Agents: 9 configured
- Model: zhipu/glm-5.1 (Coding Plan)
- Sub-agents: spawned with
sessions_spawn(mode="run"), waited with sessions_yield
Steps to reproduce
- From a Telegram DM session, spawn 1-3 sub-agents via
sessions_spawn
- Call
sessions_yield to wait for completions
- Observe: sometimes the parent wakes and delivers the result, sometimes it stays silent until the user sends a follow-up message
- When multiple sub-agents complete close together, sometimes all results arrive in a burst
Expected behavior
Each sub-agent completion should reliably:
- Wake the yielded parent session
- Deliver exactly ONE reply to the Telegram chat
- No silent loss, no duplicate burst delivery
Actual behavior
- ~50% of the time: completion is silently lost (parent stays yielded)
- ~20% of the time: multiple completions arrive simultaneously in a burst
- ~30% of the time: works as expected (single reliable delivery)
These are rough estimates from ~15 sub-agent runs over the past 2 days.
Logs / Evidence
No error-level logs observed during silent loss. The sub-agent sessions show they completed normally (full transcript, correct output). The issue appears to be in the announce/delivery layer, not the sub-agent execution.
Related Issues
Workaround (agent-side)
We've added a rule in our agent workspace: after sessions_yield resumes, the parent agent MUST immediately send an explicit reply with the sub-agent results, regardless of whether auto-announce succeeded. This partially mitigates the silent-loss case, but does not help when the parent never wakes at all.
Suggested fix
It would be great if the announce layer had a more robust delivery guarantee for Telegram:
- If channel delivery fails, fall back to injecting the completion as an internal event in the parent session (so the parent can self-reply)
- Add deduplication for queued completion events to prevent burst delivery
- Log at warn level when announce fails or is retried, so it is observable in
openclaw logs
Describe the bug
When spawning sub-agents via
sessions_spawnfrom a Telegram DM session and thensessions_yield, the completion announce back to the parent session is unreliable:Pattern A (silent loss): Sub-agent completes successfully, but the parent session never wakes up. The user gets no notification. Only when the user manually sends a follow-up message does the parent realize the child finished.
Pattern B (duplicate delivery): Multiple sub-agent completion events queue up, then when the parent does wake (user sends a message), ALL queued completions are delivered at once — resulting in 3 replies for 3 sub-agents simultaneously.
Both patterns happen intermittently on the same setup with no config changes between them.
Environment
sessions_spawn(mode="run"), waited withsessions_yieldSteps to reproduce
sessions_spawnsessions_yieldto wait for completionsExpected behavior
Each sub-agent completion should reliably:
Actual behavior
These are rough estimates from ~15 sub-agent runs over the past 2 days.
Logs / Evidence
No error-level logs observed during silent loss. The sub-agent sessions show they completed normally (full transcript, correct output). The issue appears to be in the announce/delivery layer, not the sub-agent execution.
Related Issues
Workaround (agent-side)
We've added a rule in our agent workspace: after
sessions_yieldresumes, the parent agent MUST immediately send an explicit reply with the sub-agent results, regardless of whether auto-announce succeeded. This partially mitigates the silent-loss case, but does not help when the parent never wakes at all.Suggested fix
It would be great if the announce layer had a more robust delivery guarantee for Telegram:
openclaw logs