Skip to content

Conversation

ihower
Copy link
Contributor

@ihower ihower commented Sep 17, 2025

Background

Currently, the RunHooks lifecycle (on_tool_start, on_tool_end) exposes the Tool and ToolContext, but does not include the actual arguments passed to the tool call.

Solution

This implementation is inspired by PR #1598.

  • Add a new tool_arguments field to ToolContext and populate it via from_agent_context with tool_call.arguments.
  • Update lifecycle_example.py to demonstrate tool_arguments in hooks
  • Unlike the proposal in PR #253, this solution is not expected to introduce breaking changes, making it easier to adopt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants