Skip to content

Conversation

@mkmeral
Copy link
Contributor

@mkmeral mkmeral commented Aug 12, 2025

Description

This PR improves the user experience in the handoff_to_user tool by enhancing the prompt message displayed to users. The change makes it clearer what the agent is requesting by including the agent's message in the user input prompt.

This is essentially important for customers who do not have STRANDS_TOOL_CONSOLE_MODE enabled.

Changes made:

  • Modified the user input prompt in handoff_to_user.py to include the agent's message before asking for user response
  • Updated the corresponding test to reflect the new prompt format
  • The prompt now shows: "Agent requested user input: {message}\nYour response: " instead of just "Your response: "

This improvement provides better context to users about what the agent is asking for, making the interaction more intuitive and user-friendly.

Related Issues

Documentation PR

Type of Change

Bug fix

Testing

How have you tested the change?

  • Updated existing unit test to verify the new prompt format
  • Verified that the test passes with the new implementation
  • Confirmed that the change maintains backward compatibility for the tool's functionality

Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature
  • My changes generate no new warnings

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mkmeral mkmeral requested a review from a team as a code owner August 12, 2025 16:26
@mkmeral mkmeral merged commit 0730340 into strands-agents:main Aug 25, 2025
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants