Skip to content

Conversation

@a-sekka
Copy link

@a-sekka a-sekka commented Jan 27, 2026

Summary

  • Tool calls executed during model thinking/reasoning phase were invisible to users because ToolUseStreamEvent was only emitted during contentBlockDelta, not contentBlockStart
  • Now emit a ToolUseStreamEvent immediately when contentBlockStart contains toolUse data, so PrintingCallbackHandler displays "Tool #N: name" for all tool executions

Test plan

  • Updated existing test_process_stream to account for new event
  • Added test_process_stream_emits_tool_use_event_on_content_block_start verifying the fix
  • All 51 streaming tests pass

Closes #1551

…tool calls

When models with extended thinking execute tool calls during the
reasoning phase, the tool use was never displayed to users because
ToolUseStreamEvent was only emitted during contentBlockDelta events.

Now emit a ToolUseStreamEvent immediately when contentBlockStart
contains toolUse data, ensuring all tool executions are visible
via the callback handler.

Closes strands-agents#1551
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Tool calls during model thinking are not displayed to users

1 participant