Skip to content

Text between tool calls leaks to messaging channels #25592

@doomclaw

Description

@doomclaw

Problem

When the agent produces text between tool calls (e.g., error handling, processing acknowledgments, or narration), that text gets routed to the active messaging channel (Slack, iMessage, etc.) as a visible message. This is a significant UX problem — internal processing output, failed exec error traces, and system event acknowledgments all appear as messages to the user.

Expected Behavior

Text produced between tool calls should not be sent to messaging channels. Only the agent's final, intentional response should be delivered.

Current Workaround

The agent must exercise perfect discipline to never produce any text except as the final reply, using NO_REPLY for everything else. This is fragile and fails regularly in practice — any slip (acknowledging a system event, error handling prose, thinking out loud) results in leaked messages.

Possible Solutions

  1. Silent/thinking output mode — allow the agent to produce intermediate text that is not routed to channels (similar to how thinking/reasoning blocks work)
  2. Tool-call-only mode — suppress all non-final text output when a messaging channel is active
  3. Explicit send semantics — only route text to channels when the agent explicitly uses the message tool; treat bare text as internal

Impact

This has been a recurring issue causing user frustration. The agent has been called out for this repeatedly over multiple sessions. It undermines trust when internal processing artifacts appear in professional communication channels.

Environment

  • OpenClaw running on macOS (arm64)
  • Channel: Slack (also observed with iMessage)
  • Agent: Claude Opus 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    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