-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Closed
Description
Summary
When a sub-agent spawned via sessions_spawn completes in a Telegram forum topic context, the announce step fails to deliver the result back to the requester chat. The system retries 3 times and gives up silently — the parent session never receives the completion notification.
Environment
- OpenClaw: Docker/Zeabur deployment
- Channel: Telegram (forum/supergroup with topics enabled)
- Sub-agent mode:
sessions_spawnwithmode: "run"
Steps to Reproduce
- In a Telegram forum topic (not the General topic), spawn a sub-agent:
sessions_spawn(task="...", label="test", mode="run", model="opus-4.6") - Note:
thread=truefails immediately with"thread=true is unavailable because no channel plugin registered subagent_spawning hooks" - Fall back to
thread=false— spawn succeeds, sub-agent runs and completes normally - Sub-agent finishes (
outcome.status: "ok") but the announce never arrives in the forum topic
Evidence from ~/.openclaw/subagents/runs.json
{
"runId": "<REDACTED_RUN_ID>",
"requesterSessionKey": "agent:main:telegram:group:<REDACTED_GROUP_ID>:topic:<REDACTED_TOPIC_ID>",
"requesterOrigin": {
"channel": "telegram",
"to": "telegram:<REDACTED_GROUP_ID>",
"accountId": "default",
"threadId": <REDACTED_TOPIC_ID>
},
"outcome": { "status": "ok" },
"endedReason": "subagent-complete",
"announceRetryCount": 3,
"lastAnnounceRetryAt": <REDACTED_TIMESTAMP>
}Key observations:
announceRetryCount: 3— all 3 retries failedrequesterOrigin.threadId: <REDACTED_TOPIC_ID>— the target is a forum topic- The sub-agent itself completed successfully (
outcome.status: "ok") - No error message is surfaced anywhere — the failure is completely silent
Expected Behavior
The announce message should be delivered to the same forum topic where the sub-agent was spawned, preserving the threadId / message_thread_id in the Telegram API call.
Actual Behavior
Announce delivery fails 3 times and is silently dropped. The parent session has no way to know the sub-agent finished unless it manually polls via subagents list.
Additional Context
thread=trueis not supported for Telegram at all ("no channel plugin registered subagent_spawning hooks"), so the only option isthread=false- Regular (non-forum) Telegram groups may not have this issue — the problem appears specific to forum topics where
message_thread_idrouting is required - This forces a workaround where sub-agents must write results to files instead of relying on the announce mechanism
Suggested Fix
The Telegram adapter's announce delivery path should:
- Preserve
threadIdfromrequesterOriginwhen posting the announce message - Pass
message_thread_idto the Telegram Bot APIsendMessagecall - Surface announce delivery failures in logs or as a system message to the parent session (rather than silent drop)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels