Skip to content

Bug: raw internal tool/runtime errors leak into chat as user-visible replies #51149

Closed

Description

@joesinvestments

Summary

OpenClaw is sometimes surfacing raw internal tool/runtime plumbing messages directly into user chat instead of suppressing or rewriting them into safe, human-readable replies.

This is happening frequently enough in production chat usage to be a systemic UX/runtime bug, not an isolated incident.

Examples observed

Raw messages leaking into Discord chat include things like:

  • No tool call found for function call output with call_id ...
  • raw exec completion noise / internal process completion lines
  • other internal tool/output mismatch artifacts that appear to be runtime plumbing rather than user-facing assistant output

Expected behavior

Internal runtime/tool-call mismatches, orphaned tool outputs, exec completion notices, and similar plumbing artifacts should not be delivered raw to end-user chat.

They should instead be handled by one of:

  1. suppressed entirely if non-user-actionable
  2. logged internally only
  3. rewritten into a human-readable assistant message when user-facing context is actually needed

Actual behavior

These raw internal messages can appear directly in the chat thread, which:

  • leaks implementation detail
  • creates noise/confusion for end users
  • makes the assistant appear unstable even when the underlying task succeeded
  • suggests some runtime-generated events are bypassing the normal user-facing response sanitization path

Impact

High UX impact. In our environment this is not rare. It appears often enough to erode trust in the chat surface.

Suspected root cause

Likely a message-plumbing / event-routing issue where runtime-generated tool or exec events can become user-visible replies without passing through the same filtering/sanitization/rewrite layer as normal assistant output.

The specific leaked string:

  • No tool call found for function call output with call_id ...

suggests an orphaned or mismatched tool result is being surfaced directly instead of being quarantined.

Requested fix

Please add a guardrail in the runtime/chat delivery path so that internal-only events and tool/runtime error artifacts are never emitted raw to chat.

A robust fix would likely:

  • classify internal/runtime/tool-plumbing events separately from user-visible assistant replies
  • suppress known internal event classes from channel delivery
  • provide a safe fallback rewrite for cases where the user should be informed that an internal execution problem occurred
  • add regression tests for orphaned tool outputs / call_id mismatches / exec completion artifacts

Repro notes

The exact trigger appears to involve tool/runtime mismatch paths rather than one specific user prompt. The leak occurs during normal chat operation when tool or exec plumbing hits an edge case.

Environment

  • OpenClaw chat usage in Discord
  • Runtime-generated internal events are visible on the user-facing surface

If helpful, I can follow up with additional examples once I finish tracing the local runtime path.

Activity

  1. Ryce commented on Mar 20, 2026

    @Ryce
  2. steipete commented on Apr 25, 2026

    @steipete
    Contributor

    Closing this as implemented after Codex review.

    Current main already has the requested guardrails: commentary-phase assistant text is suppressed before delivery, assistant-visible text is sanitized before channel emission, internal runtime context blocks are stripped, and orphaned tool results are dropped by replay sanitization. The relevant guardrail files are unchanged between v2026.4.22 and current main, so this appears to have shipped in that release.

    What I checked:

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review notes: reviewed against 6944d7025d9c; fix evidence: release v2026.4.22.

  3. locked as resolved and limited conversation to collaborators on Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions