Skip to content

[BUG] A2AClientToolProvider errors not surfaced as tool errors through @tool decorator #606

Open

Description

@Gastly

Checks

  • I have updated to the lastest minor and patch version of Strands
  • I have checked the documentation and this is not expected behavior
  • I have searched ./issues and there are no duplicates of my issue

Strands Version

1.55.0

Tools Package Version

0.8.7

Tools used

a2a_send_message

Python Version

3.11

Operating System

AL2_x86_64

Installation Method

other

Steps to Reproduce

  1. Create an A2AClientToolProvider with an unreachable agent URL
  2. Register an AfterToolCallEvent hook that checks for status="error"
  3. Call a2a_send_message through a Strands agent
  4. The hook never fires - the ToolResult has status="success" with the error buried in text content

Expected Behavior

Expected behavior: a2a_send_message errors should produce status="error" tool results so downstream hooks and middleware can detect and respond to failures.

Actual Behavior

The result gets wrapped as status="success" with the error dict JSON-serialized as text content.

Additional Context

No response

Possible Solution

Add "content": [{"text": "..."}] to error return shapes while preserving existing keys for backward compatibility.

Related Issues

No response

Activity

  1. added 3 commits that reference this issue on Sep 15, 2026
    424c358
    fb2fca2
    23d00a1
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

    bugSomething isn't working

    Type

    No type

    Fields

    Language

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions