Skip to content

Silent/NO_REPLY responses leak debug fallback message to channels #614

@f-liva

Description

@f-liva

Bug

When an agent intentionally returns NO_REPLY (empty response with silent: true), the system generates a debug fallback message like:

[The agent completed processing but returned no text response. (3 in / 8 out | 1 iter)]

This message is sent back to the channel (WhatsApp, Telegram, etc.) instead of being suppressed.

Root Cause

  • routes.rs: The REST endpoint checks for empty responses but doesn't check the silent field from AgentLoopResult, generating a debug fallback instead.
  • ws.rs: The WebSocket handler has the same issue — empty responses get a fallback message even when the agent chose to be silent.
  • types.rs: MessageResponse struct was missing the silent field.

Expected Behavior

When an agent returns NO_REPLY / silent response:

  1. The API should return { "silent": true } in the response
  2. Channel gateways should not send any message to the user

Affected Channels

  • WhatsApp (gateway sends the debug text as a regular message)
  • Any channel using the REST or WebSocket API

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions