Skip to content

Bug: Tool error results (isError: true) leak to user as messages #17828

@AuthorityNull

Description

@AuthorityNull

Description

When a tool call returns isError: true, the error text is forwarded to the user as part of the assistant's reply. This exposes internal tool errors (stack traces, permission errors, etc.) that should stay in the agent's context for self-correction, not be shown to the user.

Current behavior

Tool result with isError: true → included in outbound payload filter → sent to user as message text.

Expected behavior

Filter out isError payloads from user-facing messages. The agent already sees the error in its context and can decide how to communicate it.

Suggested fix

In the payload filter (reply handler), add:

if (p.isError) return false;

This is a single line addition to the payload filtering pipeline.

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