openclaw - 💡(How to fix) Fix [Feature]: Gateway-level suppression of intermediate text output (pre-tool narration) [1 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#50985Fetched 2026-04-08 01:05:55
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Participants
Timeline (top)
commented ×1cross-referenced ×1

Fix Action

Fix / Workaround

  • #50984 — Thread session routing (separate but related multi-agent coordination issue)
  • #5470 — replyToMode: off threading bug (closed, local patch applied)

Code Example

{
  "agents": {
    "main": {
      "suppressIntermediateText": true
    }
  }
}

---

{
  "channels": {
    "slack": {
      "outputMode": "result-only"
    }
  }
}
RAW_BUFFERClick to expand / collapse

Problem

In multi-agent Slack deployments, language models frequently emit intermediate text before or between tool calls — "Let me check...", "I'll look into that...", process narration. This text is posted to the channel as a visible message, creating noise.

Why prompt engineering is insufficient

  • System prompts say "don't narrate" but compete with training defaults (models are trained to explain their reasoning)
  • When AGENTS.md says "don't narrate routine calls" and SOUL.md says "speak when needed", the model resolves ambiguity toward speech — the cost of silence-when-expected is perceived as higher than speech-when-unwanted
  • blockStreamingDefault: on prevents inter-chunk streaming leaks but does NOT suppress deliberate text output
  • thinkingDefault: low provides private reasoning space but the model still voluntarily emits text

This is fundamentally fighting the grain of a language model. Producing language is what it does. The fix should be structural, not behavioural.

Proposed solution

A gateway-level config option that suppresses text output that precedes tool calls:

{
  "agents": {
    "main": {
      "suppressIntermediateText": true
    }
  }
}

Behaviour:

  • When suppressIntermediateText: true, any text block that is followed by a tool call is dropped (not posted to the channel)
  • Only the final text after all tool calls complete is delivered
  • If the entire response is text (no tool calls), it is delivered normally
  • This is per-agent, allowing different behaviour for different bots

Alternative: per-channel output mode

{
  "channels": {
    "slack": {
      "outputMode": "result-only"
    }
  }
}

This would be channel-scoped rather than agent-scoped, useful for group channels where narration is never wanted but allowing it in DMs.

Impact

In our 5-agent deployment, intermediate narration accounts for ~30-40% of visible messages in group channels. Each narration message:

  • Adds cognitive load for humans monitoring channels
  • Can trigger other agents to respond (cascade risk)
  • Wastes channel space with no informational value

Related

  • #50984 — Thread session routing (separate but related multi-agent coordination issue)
  • #5470 — replyToMode: off threading bug (closed, local patch applied)

Environment

  • OpenClaw 2026.1.24-3
  • Slack (Socket Mode)
  • 5 agents across 2 servers
  • blockStreamingDefault: on, thinkingDefault: low already configured

extent analysis

Fix Plan

To address the issue of intermediate text emission by language models in multi-agent Slack deployments, we will implement a gateway-level config option to suppress text output that precedes tool calls.

Step-by-Step Solution:

  1. Add config option: Introduce a new configuration option suppressIntermediateText at the agent level.
{
  "agents": {
    "main": {
      "suppressIntermediateText": true
    }
  }
}
  1. Implement text suppression logic: Modify the gateway to check for the presence of suppressIntermediateText and suppress text output that precedes tool calls.
def process_agent_response(response):
    if response.get('agent_config', {}).get('suppressIntermediateText'):
        # Check if response contains a tool call
        if has_tool_call(response):
            # Drop intermediate text
            response['text'] = ''
    return response

def has_tool_call(response):
    # Implement logic to check for tool calls in the response
    pass
  1. Alternative: per-channel output mode: Optionally, introduce a channel-scoped configuration option outputMode to suppress intermediate text.
{
  "channels": {
    "slack": {
      "outputMode": "result-only"
    }
  }
}

Example Code:

def process_channel_response(response, channel_config):
    if channel_config.get('outputMode') == 'result-only':
        # Suppress intermediate text
        response['text'] = ''
    return response

Verification

To verify the fix, monitor the Slack channel for intermediate text emission and check that only the final text after all tool calls complete is delivered.

Extra Tips

  • Ensure that the suppressIntermediateText option is properly propagated to all agents and channels.
  • Consider implementing a fallback mechanism to handle cases where the suppression logic fails.
  • Review related issues, such as #50984 and #5470, to ensure that the fix does not introduce new problems.

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…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING