Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

[BUG] ToolUse not picked up correctly #533

Description

@kiberonlabsdev

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

0.2.2

Node.js Version

v24.11.1

Operating System

Windows 10

Installation Method

pnpm

Steps to Reproduce

Image

When using AWS bedrock as the provider, when a tool use invocation is stored in a session, the contentBlockFromData does not correctly identify the tool use content block as the key toolUse does not exist, however the type does. We expect it to correctly identify the tool use

Expected Behavior

Tooluse blocks identified correctly, no error thrown

Actual Behavior

Throws an error

    message: 'Unknown ContentBlockData type',
    stack: 'Error: Unknown ContentBlockData type\n' +
      '    at contentBlockFromData (<REDACTED>\\node_modules\\.pnpm\\@strands-agents+sdk@0.2.2_@_4fdc0782c8ba8acb774b26fd67f8f25f\\node_modules\\@strands-agents\\sdk\\src\\types\\messages.ts:618:11)\n' 

Additional Context

No response

Possible Solution

Use the data.type =='toolUse' as an alternate check

Related Issues

No response

Activity

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