Skip to content

Sub-agent exec failures leak to parent session Telegram channel despite suppressToolErrors + notifyOnExit:false #19894

@toni-brr

Description

@toni-brr

Problem

When a sub-agent (spawned via sessions_spawn) runs an exec tool call that fails (non-zero exit code or stderr output), the error notification is delivered to the parent session's Telegram channel as a visible warning message.

This happens despite both suppression flags being set:

  • messages.suppressToolErrors: true
  • tools.exec.notifyOnExit: false

Expected Behavior

Sub-agent exec failures should be contained within the sub-agent session. The parent session's channel should not receive inline exec error notifications from child sessions.

Current Behavior

Every failed exec in a sub-agent produces a visible Telegram message in the parent chat like:

Warning: Exec: pty ... failed: [PTY escape codes...]

This includes raw PTY escape codes, making it doubly noisy.

Analysis

Reproduction

  1. Set messages.suppressToolErrors: true and tools.exec.notifyOnExit: false
  2. Spawn a sub-agent via sessions_spawn
  3. Sub-agent runs an exec command that fails (e.g., Python syntax error, missing module)
  4. Parent session's Telegram chat receives the exec failure notification

Environment

  • OpenClaw: 2026.2.15
  • Channel: Telegram
  • Provider: Anthropic (Claude Opus 4.6)
  • OS: Windows 10 (x64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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