openclaw - ✅(Solved) Fix [Bug] Subagent completion triggers duplicate delivery: raw status fallback + proper summary [2 pull requests, 2 comments, 3 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#66519Fetched 2026-04-15 06:25:55
View on GitHub
Comments
2
Participants
3
Timeline
9
Reactions
0
Timeline (top)
commented ×2cross-referenced ×2labeled ×2closed ×1

When a subagent completes a task, the main agent sends two separate messages to the delivery channel: first a raw status fallback prefixed with "Automatic session resume failed, so sending the status directly.", then a proper formatted summary. Gateway CPU stays at ~100% between both messages.

Root Cause

When a subagent completes a task, the main agent sends two separate messages to the delivery channel: first a raw status fallback prefixed with "Automatic session resume failed, so sending the status directly.", then a proper formatted summary. Gateway CPU stays at ~100% between both messages.

Fix Action

Fixed

PR fix notes

PR #66555: fix(subagent): suppress all exec approval followups for subagent sessions

Description (problem / solution / changelog)

Fixes #66519

When a subagent completes, two delivery paths race:

  1. exec approval followup mechanism (sends fallback if session resume fails)
  2. main agent's subagent completion mechanism (sends proper summary)

This causes duplicate messages: first raw status with 'Automatic session resume failed' prefix, then clean summary. Gateway CPU spikes to ~100% between messages.

Changes

  • Extend suppression from denied-only to ALL subagent exec approval followups
  • Add shouldSuppressExecFollowupForSubagents() for all subagent sessions
  • Add test case for successful followup suppression
  • Subagent completions handled exclusively by main agent mechanism

Impact

Eliminates duplicate delivery and CPU spikes on subagent completion

Testing

✅ All existing tests pass ✅ New test case validates the fix

Changed files

  • src/agents/bash-tools.exec-approval-followup.test.ts (modified, +16/-0)
  • src/agents/bash-tools.exec-approval-followup.ts (modified, +7/-0)

PR #66556: fix(telegram): filter undefined paths to prevent voice transcription failure

Description (problem / solution / changelog)

Fixes #62496

When Telegram voice notes have undefined paths in allMedia array, the transcription preflight fails because normalizeAttachments filters out entries where both path and url are undefined, causing silent transcription failure.

Root cause: allMedia.map((m) => m.path) creates array with undefined values when voice note path is not set, then normalizeAttachments drops all attachments.

Changes

  • Filter undefined paths with .filter(Boolean) before creating MediaPaths array
  • Apply fix to both bot-message-context.body.ts and bot-message-context.session.ts
  • Add test case for handling voice messages with undefined paths gracefully

Impact

Telegram voice transcription now works even when some media paths are undefined

Testing

✅ All existing tests pass ✅ New test case validates the fix

Changed files

  • extensions/telegram/src/bot-message-context.body.ts (modified, +1/-1)
  • extensions/telegram/src/bot-message-context.session.ts (modified, +2/-2)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

When a subagent completes a task, the main agent sends two separate messages to the delivery channel: first a raw status fallback prefixed with "Automatic session resume failed, so sending the status directly.", then a proper formatted summary. Gateway CPU stays at ~100% between both messages.

Steps to reproduce

  1. Start a task that spawns a subagent
  2. Wait for the subagent to complete
  3. Observe two messages arriving in Telegram within seconds of each other

Expected behavior

A single clean summary message from the main agent after subagent completion. No raw fallback message before it.

Actual behavior

Two messages arrive in Telegram after subagent completion: first a raw fallback with "Automatic session resume failed, so sending the status directly." prefix, then a clean summary. Gateway CPU stays at ~100% between both messages.

OpenClaw version

2026.4.14-beta.1 (d7cc6f7)

Operating system

Ubuntu Linux, systemd user service

Install method

GitHub source (git clone + build)

Model

OpenAI Codex 5.4

Provider / routing chain

openclaw -> openai-codex (OAuth)

Additional provider/model setup details

OpenAI Codex OAuth authentication. No proxies or model routers involved.

Logs, screenshots, and evidence

Impact and severity

Affected: Telegram delivery channel Severity: Medium (confusing UX, redundant messages) Frequency: Every subagent completion Consequence: User receives duplicate information, cannot reliably determine which message is authoritative. Gateway CPU spikes to ~100% between both messages.

Additional information

Related issues: 50791, 51917, 62442

The first message always contains "Automatic session resume failed, so sending the status directly." - this appears to be a session resume failure triggering a direct status delivery, while the main agent simultaneously delivers its own formatted summary. The second message is always the authoritative one.

extent analysis

TL;DR

The issue can be mitigated by investigating and fixing the "Automatic session resume failed" error, which is causing the main agent to send a raw status fallback message before the proper formatted summary.

Guidance

  • Investigate the cause of the "Automatic session resume failed" error, which is triggering the direct status delivery and resulting in the redundant message.
  • Review related issues (50791, 51917, 62442) to see if they provide any insight into the session resume failure.
  • Consider adding logging or debugging statements to understand the sequence of events leading up to the error and the subsequent message sends.
  • Verify that the OpenAI Codex OAuth authentication is correctly configured, as authentication issues could potentially contribute to the session resume failure.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The high CPU usage between the two messages suggests that there may be additional performance implications to this issue beyond the redundant messaging.

Recommendation

Apply workaround: Investigate and fix the "Automatic session resume failed" error, as this appears to be the root cause of the redundant messaging issue. This approach is recommended because it addresses the underlying issue rather than just the symptoms.

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…

FAQ

Expected behavior

A single clean summary message from the main agent after subagent completion. No raw fallback message before it.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING