openclaw - 💡(How to fix) Fix [Bug]: Telegram forum-topic subagent completion fails when announce agent does not use message tool [1 pull requests]

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…

A Codex subagent completed successfully from a Telegram forum-topic requester, but the completion announcement was dropped because the announce/follow-up agent produced normal final text instead of using the message tool required for group/topic delivery.

Error Message

2026-05-21T18:47:32.908+00:00 [warn] Subagent completion direct announce failed for run f8113cfa-94e8-4e08-aa28-713c962fcdfc: completion agent did not deliver through the message tool 2026-05-21T18:47:34.182+00:00 [warn] Subagent completion direct announce failed for run f8113cfa-94e8-4e08-aa28-713c962fcdfc: completion agent did not deliver through the message tool 2026-05-21T18:47:36.446+00:00 [warn] Subagent completion direct announce failed for run f8113cfa-94e8-4e08-aa28-713c962fcdfc: completion agent did not deliver through the message tool 2026-05-21T18:47:36.640+00:00 [warn] Subagent announce give up (retry-limit) run=f8113cfa-94e8-4e08-aa28-713c962fcdfc child=agent:codex:subagent:a8b9e885-8a51-4472-9626-27e0a494990b requester=agent:main:telegram:group:-1003871627242:topic:6823 retries=3 endedAgo=87s deliveryError="completion agent did not deliver through the message tool; direct-primary: completion agent did not deliver through the message tool" "error": "completion agent did not deliver through the message tool; direct-primary: completion agent did not deliver through the message tool"

Root Cause

A Codex subagent completed successfully from a Telegram forum-topic requester, but the completion announcement was dropped because the announce/follow-up agent produced normal final text instead of using the message tool required for group/topic delivery.

Fix Action

Fixed

Code Example

2026-05-21T18:47:32.908+00:00 [warn] Subagent completion direct announce failed for run f8113cfa-94e8-4e08-aa28-713c962fcdfc: completion agent did not deliver through the message tool
2026-05-21T18:47:34.182+00:00 [warn] Subagent completion direct announce failed for run f8113cfa-94e8-4e08-aa28-713c962fcdfc: completion agent did not deliver through the message tool
2026-05-21T18:47:36.446+00:00 [warn] Subagent completion direct announce failed for run f8113cfa-94e8-4e08-aa28-713c962fcdfc: completion agent did not deliver through the message tool
2026-05-21T18:47:36.640+00:00 [warn] Subagent announce give up (retry-limit) run=f8113cfa-94e8-4e08-aa28-713c962fcdfc child=agent:codex:subagent:a8b9e885-8a51-4472-9626-27e0a494990b requester=agent:main:telegram:group:-1003871627242:topic:6823 retries=3 endedAgo=87s deliveryError="completion agent did not deliver through the message tool; direct-primary: completion agent did not deliver through the message tool"

---

{
  "runtime": "subagent",
  "sourceId": "f8113cfa-94e8-4e08-aa28-713c962fcdfc",
  "requesterSessionKey": "agent:main:telegram:group:-1003871627242:topic:6823",
  "childSessionKey": "agent:codex:subagent:a8b9e885-8a51-4472-9626-27e0a494990b",
  "status": "succeeded",
  "deliveryStatus": "failed",
  "error": "completion agent did not deliver through the message tool; direct-primary: completion agent did not deliver through the message tool"
}

---

/usr/bin/openclaw -> /usr/lib/node_modules/openclaw/openclaw.mjs
ExecStart=/usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789

---

2026-05-21T18:39:36.894+00:00 [telegram] sendMessage ok chat=-1003871627242 message=10020

---

openclaw --version
OpenClaw 2026.5.19 (a185ca2)

command -v openclaw
/usr/bin/openclaw

readlink -f /usr/bin/openclaw
/usr/lib/node_modules/openclaw/openclaw.mjs

systemctl --user show openclaw-gateway -p ActiveState -p SubState -p NRestarts
ActiveState=active
SubState=running
NRestarts=0

openclaw doctor --lint
{"ok":true,"checksRun":17,"checksSkipped":0,"findings":[]}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

A Codex subagent completed successfully from a Telegram forum-topic requester, but the completion announcement was dropped because the announce/follow-up agent produced normal final text instead of using the message tool required for group/topic delivery.

Steps to reproduce

  1. Run OpenClaw 2026.5.19 (a185ca2) with a Telegram forum topic bound to a main agent.
  2. From that Telegram topic, ask the main agent to spawn a codex subagent for a real background task.
  3. Let the child run complete.
  4. Inspect openclaw tasks list and gateway logs.

Observed run:

  • requester: agent:main:telegram:group:-1003871627242:topic:6823
  • child: agent:codex:subagent:a8b9e885-8a51-4472-9626-27e0a494990b
  • run: f8113cfa-94e8-4e08-aa28-713c962fcdfc
  • subagent status: succeeded
  • subagent deliveryStatus: failed

Expected behavior

The subagent completion should be delivered back to the original Telegram forum topic.

If Telegram group/forum-topic completion delivery intentionally requires message_tool_only, the completion announce agent should be prompted/forced to call message(action="send"), or OpenClaw should otherwise convert a valid completion into an outbound Telegram message instead of suppressing it.

Actual behavior

The subagent completed successfully, but the completion announcement never reached Telegram.

Gateway logs show three retries and then give-up:

2026-05-21T18:47:32.908+00:00 [warn] Subagent completion direct announce failed for run f8113cfa-94e8-4e08-aa28-713c962fcdfc: completion agent did not deliver through the message tool
2026-05-21T18:47:34.182+00:00 [warn] Subagent completion direct announce failed for run f8113cfa-94e8-4e08-aa28-713c962fcdfc: completion agent did not deliver through the message tool
2026-05-21T18:47:36.446+00:00 [warn] Subagent completion direct announce failed for run f8113cfa-94e8-4e08-aa28-713c962fcdfc: completion agent did not deliver through the message tool
2026-05-21T18:47:36.640+00:00 [warn] Subagent announce give up (retry-limit) run=f8113cfa-94e8-4e08-aa28-713c962fcdfc child=agent:codex:subagent:a8b9e885-8a51-4472-9626-27e0a494990b requester=agent:main:telegram:group:-1003871627242:topic:6823 retries=3 endedAgo=87s deliveryError="completion agent did not deliver through the message tool; direct-primary: completion agent did not deliver through the message tool"

openclaw tasks list showed the child succeeded but delivery failed:

{
  "runtime": "subagent",
  "sourceId": "f8113cfa-94e8-4e08-aa28-713c962fcdfc",
  "requesterSessionKey": "agent:main:telegram:group:-1003871627242:topic:6823",
  "childSessionKey": "agent:codex:subagent:a8b9e885-8a51-4472-9626-27e0a494990b",
  "status": "succeeded",
  "deliveryStatus": "failed",
  "error": "completion agent did not deliver through the message tool; direct-primary: completion agent did not deliver through the message tool"
}

OpenClaw version

2026.5.19 (a185ca2)

Operating system

Ubuntu 24.04.3 LTS aarch64

Install method

npm global, single system install:

/usr/bin/openclaw -> /usr/lib/node_modules/openclaw/openclaw.mjs
ExecStart=/usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789

Model

openai/gpt-5.5 for both main and codex agents

Provider / routing chain

OpenClaw -> OpenAI provider

Additional provider/model setup details

  • main is allowed to spawn codex.
  • main.subagents.requireAgentId is enabled.
  • main.subagents.allowAgents includes codex.
  • Telegram source replies in the same topic worked during the same window. Example log before the subagent completion failure:
2026-05-21T18:39:36.894+00:00 [telegram] sendMessage ok chat=-1003871627242 message=10020

Logs, screenshots, and evidence

I checked whether this was local Telegram/OpenClaw setup before filing:

openclaw --version
OpenClaw 2026.5.19 (a185ca2)

command -v openclaw
/usr/bin/openclaw

readlink -f /usr/bin/openclaw
/usr/lib/node_modules/openclaw/openclaw.mjs

systemctl --user show openclaw-gateway -p ActiveState -p SubState -p NRestarts
ActiveState=active
SubState=running
NRestarts=0

openclaw doctor --lint
{"ok":true,"checksRun":17,"checksSkipped":0,"findings":[]}

I also inspected the completion follow-up transcript. The completion agent had the message tool available in session metadata, but the transcript did not contain the message_tool_only / "normal final text stays private, use message(action=send)" prompt hints. The agent produced normal final text, not a message tool call. Because the Telegram group/topic path required message-tool evidence, OpenClaw marked delivery as failed and did not send the normal final text.

Grounded local findings:

  • normal Telegram sendMessage works for the same topic;
  • Telegram plugin/runtime config validates;
  • the child subagent completed successfully;
  • the completion follow-up had access to the message tool;
  • delivery failed specifically because no message tool call was emitted by the completion agent.

Impact and severity

Affected: Telegram group/forum-topic sessions using subagent completion auto-announce.

Severity: High for delegated/Codex workflows. The background work can succeed, but the requester never receives the result unless a human manually inspects tasks/logs.

Frequency: observed on the live 2026.5.19 VPS repro above. NOT_ENOUGH_INFO on whether it happens for every Telegram forum-topic subagent completion.

Consequence: successful child work appears lost to the Telegram user, and the task ledger shows deliveryStatus=failed after retry-limit.

Additional information

This looks related to the broader subagent completion reliability area, but narrower than older reports such as #44925 and #83863. The specific current failure is: Telegram group/forum-topic completion requires message_tool_only, while the completion announce agent is not successfully instructed/forced to use the message tool.

Likely investigation surfaces, based on installed-build inspection:

  • src/agents/subagent-announce-delivery.ts
  • src/agents/system-prompt.ts
  • source reply delivery mode handling for group/channel completion announcements

I plan to pick this up and open a PR for the fix, assuming maintainers agree this is the right issue shape/scope.

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

The subagent completion should be delivered back to the original Telegram forum topic.

If Telegram group/forum-topic completion delivery intentionally requires message_tool_only, the completion announce agent should be prompted/forced to call message(action="send"), or OpenClaw should otherwise convert a valid completion into an outbound Telegram message instead of suppressing 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