Checks
Strands Version
1.27.0
Tools Package Version
0.2.21
Tools used
- Browser Tool
Python Version
3.12
Operating System
Windows 11 (WSL2 - Ubuntu)
Installation Method
pip
Steps to Reproduce
- Use the browser tool's get_html action to fetch a page with more than 1,000 characters of HTML
- Observe the returned output
- Attempt to process the HTML downstream (e.g., via an AfterToolCallEvent hook that converts HTML to markdown)
Expected Behavior
get_html returns the full HTML content of the page (or at minimum, a well-formed HTML fragment), allowing downstream tools and hooks to process it.
Actual Behavior
get_html silently truncates the output at 1,000 characters. The result is an incomplete, malformed HTML fragment. Any downstream processing (e.g., HTML-to-markdown conversion via AfterToolCallEvent) fails because it receives broken HTML
Additional Context
There is no way to disable or configure this truncation, it is hard-coded. This effectively makes get_html unusable for any pipeline that needs to process the full page content.
Reference PR with a proposed fix: Merge Request
Possible Solution
Remove the hard-coded 1,000-character limit. Return full HTML by default and add an optional max_length parameter so callers can opt-in to truncation at a custom limit.
Related Issues
No response
Checks
Strands Version
1.27.0
Tools Package Version
0.2.21
Tools used
Python Version
3.12
Operating System
Windows 11 (WSL2 - Ubuntu)
Installation Method
pip
Steps to Reproduce
Expected Behavior
get_html returns the full HTML content of the page (or at minimum, a well-formed HTML fragment), allowing downstream tools and hooks to process it.
Actual Behavior
get_html silently truncates the output at 1,000 characters. The result is an incomplete, malformed HTML fragment. Any downstream processing (e.g., HTML-to-markdown conversion via AfterToolCallEvent) fails because it receives broken HTML
Additional Context
There is no way to disable or configure this truncation, it is hard-coded. This effectively makes get_html unusable for any pipeline that needs to process the full page content.
Reference PR with a proposed fix: Merge Request
Possible Solution
Remove the hard-coded 1,000-character limit. Return full HTML by default and add an optional max_length parameter so callers can opt-in to truncation at a custom limit.
Related Issues
No response