Skip to content

RunHooksBase on_tool_end result type error #3512

@sandsc

Description

@sandsc
Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/agents/run_internal/tool_execution.py", line 1598, in _run_single_tool
    result = await self._execute_single_tool_body(
  File "/app/.venv/lib/python3.12/site-packages/agents/run_internal/tool_execution.py", line 1743, in _execute_single_tool_body
    return await self._await_invoke_task(outer_task=outer_task, invoke_task=invoke_task)
  File "/app/.venv/lib/python3.12/site-packages/agents/run_internal/tool_execution.py", line 1812, in _await_invoke_task
    return await asyncio.shield(invoke_task)
  File "/app/.venv/lib/python3.12/site-packages/agents/run_internal/tool_execution.py", line 1796, in _invoke_tool_and_run_post_invoke
    self.hooks.on_tool_end(tool_context, self.public_agent, func_tool, final_result),
TypeError: Argument 'result' has incorrect type (expected str, got dict)

Debug information

  • Agents SDK version: 0.17.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions