openclaw - 💡(How to fix) Fix [Bug] Subagent completion announce silently dropped on Feishu channel — parent session stuck until next user message [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78260Fetched 2026-05-07 03:39:05
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
2
Author
Timeline (top)
mentioned ×3subscribed ×3closed ×1commented ×1

Subagent completion announcements are silently dropped when the parent session is idle between turns (after sessions_yield). The parent session remains stuck until the user sends another message, at which point the queued result finally appears.

This is the same root cause as #75663 (reported for Telegram), but confirming it also affects Feishu channel and providing additional reproduction context from production usage.

Root Cause

Same as #75663 — in subagent-announce-delivery.ts, when the parent session is between turns (post-sessions_yield idle state):

  1. queueEmbeddedPiMessage returns false (run is not actively streaming)
  2. sendCompletionFallback fails (no direct channel target)
  3. Early return with { delivered: false } prevents fallback to runAnnounceDeliveryWithRetry gateway call
  4. The result is queued but never delivered — dead letter

Fix Action

Workaround

We have implemented a cron-based watchdog as a temporary workaround:

# After spawning subagents, set a one-shot cron as fallback
FIRE_TIME=$(date -u -v+3M "+%Y-%m-%dT%H:%M:%SZ")
openclaw cron add \
  --name "subagent-check-$(date +%s)" \
  --at "$FIRE_TIME" \
  --delete-after-run \
  --agent main \
  --session main \
  --session-key "agent:main:feishu:default:direct:ou_xxx" \
  --system-event "检查subagent输出文件是否就绪,如果就绪则继续处理"

This ensures that even if announce fails, the parent session is woken within 3 minutes via a system-event cron job.

Code Example

# After spawning subagents, set a one-shot cron as fallback
FIRE_TIME=$(date -u -v+3M "+%Y-%m-%dT%H:%M:%SZ")
openclaw cron add \
  --name "subagent-check-$(date +%s)" \
  --at "$FIRE_TIME" \
  --delete-after-run \
  --agent main \
  --session main \
  --session-key "agent:main:feishu:default:direct:ou_xxx" \
  --system-event "检查subagent输出文件是否就绪,如果就绪则继续处理"

---

// In subagent-announce-delivery.ts
if (requesterActivity.isActive) {
  try {
    const didFallback = await sendCompletionFallback({...});
    if (didFallback) {
      return { delivered: true, path: "..." };
    }
    // DON'T return here — fall through to gateway call below
  } catch (err) {
    // DON'T return here — fall through to gateway call below
  }
}

// This path should be reached even when requesterActivity.isActive
directAnnounceResponse = await runAnnounceDeliveryWithRetry({...});
RAW_BUFFERClick to expand / collapse

Summary

Subagent completion announcements are silently dropped when the parent session is idle between turns (after sessions_yield). The parent session remains stuck until the user sends another message, at which point the queued result finally appears.

This is the same root cause as #75663 (reported for Telegram), but confirming it also affects Feishu channel and providing additional reproduction context from production usage.

Environment

  • OpenClaw version: 2026.5.3-1
  • Channel: Feishu (push-based delivery)
  • Node: v22.22.0
  • OS: macOS 26.4.1 (arm64)
  • Model: icomp/glm-5.1

Impact

This bug has caused 3 production incidents in a single day (2026-05-06), each requiring the user to manually prompt the agent to continue work that subagents had already completed:

  1. 08:30 For You tweet collection — 4 subagents completed but announce never reached parent. User had to message "为啥总是等最后一批?实际上4批都完成了!"
  2. 10:00 Following tweet collection — Same pattern. User had to prompt again.
  3. Each time, all subagent output files existed on disk, confirming subagents finished successfully.

Steps to Reproduce

  1. From a Feishu DM, trigger a task that uses sessions_spawn to create subagents
  2. Call sessions_yield to wait for subagent completion
  3. Subagents complete (can verify via subagents list or checking output files)
  4. Observe: no response delivered to Feishu — parent session remains idle
  5. User sends any message → subagent results immediately appear

Root Cause

Same as #75663 — in subagent-announce-delivery.ts, when the parent session is between turns (post-sessions_yield idle state):

  1. queueEmbeddedPiMessage returns false (run is not actively streaming)
  2. sendCompletionFallback fails (no direct channel target)
  3. Early return with { delivered: false } prevents fallback to runAnnounceDeliveryWithRetry gateway call
  4. The result is queued but never delivered — dead letter

Workaround

We have implemented a cron-based watchdog as a temporary workaround:

# After spawning subagents, set a one-shot cron as fallback
FIRE_TIME=$(date -u -v+3M "+%Y-%m-%dT%H:%M:%SZ")
openclaw cron add \
  --name "subagent-check-$(date +%s)" \
  --at "$FIRE_TIME" \
  --delete-after-run \
  --agent main \
  --session main \
  --session-key "agent:main:feishu:default:direct:ou_xxx" \
  --system-event "检查subagent输出文件是否就绪,如果就绪则继续处理"

This ensures that even if announce fails, the parent session is woken within 3 minutes via a system-event cron job.

Suggested Fix

From #75663 analysis — remove the early return in the requesterActivity.isActive block and allow fallthrough to runAnnounceDeliveryWithRetry:

// In subagent-announce-delivery.ts
if (requesterActivity.isActive) {
  try {
    const didFallback = await sendCompletionFallback({...});
    if (didFallback) {
      return { delivered: true, path: "..." };
    }
    // DON'T return here — fall through to gateway call below
  } catch (err) {
    // DON'T return here — fall through to gateway call below
  }
}

// This path should be reached even when requesterActivity.isActive
directAnnounceResponse = await runAnnounceDeliveryWithRetry({...});

Related Issues

  • #75663 — Original report for Telegram channel (same root cause)
  • #74448 — Subagent completion fires on session-compaction
  • #52249 — ACP parent session stuck until refresh

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug] Subagent completion announce silently dropped on Feishu channel — parent session stuck until next user message [1 comments, 2 participants]