Skip to content

Telegram: tool failure warning (⚠️ 🛠️ Exec ... failed) can overshadow/mask final assistant reply #18687

@Louise-Qiuqiu

Description

@Louise-Qiuqiu

Summary

In Telegram group chats, when a tool call fails (e.g. exec), OpenClaw may send the warning line (e.g. ⚠️ 🛠️ Exec: ... failed) and the user can miss the assistant’s normal final reply, even though the run completes successfully.

I observed this in a real conversation where:

  • tool call failed first (gh not installed),
  • the agent recovered and completed the task,
  • the final assistant message exists in session transcript,
  • but the user reported only seeing the tool-failure warning message in Telegram.

Environment

  • OpenClaw: 2026.2.15 (3fe22ea)
  • Channel: Telegram (group chat)
  • Runtime: gateway local systemd
  • Model during repro: openai-codex/gpt-5.3-codex

Reproduction (practical)

  1. In Telegram group chat, ask the assistant to do a multi-step task that triggers exec.
  2. Ensure first command fails (example: gh --version on host without gh).
  3. Let the assistant continue with fallback logic and complete task.
  4. Observe Telegram output: warning line appears (⚠️ 🛠️ Exec: ... failed).
  5. In some cases, user reports not seeing the final assistant reply (though transcript contains it).

Evidence from local run

  • Tool failure logged:
    • error [tools] exec failed: /bin/sh: 1: gh: not found ...
  • Same run completed normally:
    • embedded run done ... aborted=false
  • Session transcript contains a normal assistant final message for that turn.

Suspected code paths

  1. Tool warning payload generation:

    • src/agents/pi-embedded-runner/run/payloads.ts
    • buildEmbeddedRunPayloads() adds warning text:
      • ⚠️ ${formatToolAggregate(...)} failed...
  2. Potential blocking before final payload send:

    • src/auto-reply/reply/agent-runner.ts
    • tool result delivery tasks are tracked and awaited (Promise.allSettled(pendingToolTasks)) before final reply payload dispatch.
    • If tool-result delivery path stalls/fails in-channel, final reply timing/delivery may be impacted.

Expected behavior

  • Tool-failure diagnostics should not replace/block the final assistant response.
  • If warning is shown, final answer should still reliably arrive.

Note

No fix proposal in this report — sharing user-visible impact + likely code areas for investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions