---
type: email
from: muneebarshadd <notifications@github.com>
subject: [openai/openai-agents-python] `on_llm_end` hook not being called for

 agents with handoffs (Issue #1909)
received: 2026-03-06 08:05:45
date_header: Thu, 16 Oct 2025 09:15:15 -0700
priority: normal
status: awaiting_approval
uid: 32732
---

## Email Content

**From:** muneebarshadd <notifications@github.com>
**Subject:** [openai/openai-agents-python] `on_llm_end` hook not being called for

 agents with handoffs (Issue #1909)
**Date:** Thu, 16 Oct 2025 09:15:15 -0700

### Body (preview)

muneebarshadd created an issue (openai/openai-agents-python#1909)



## Title



`on_llm_end` hook not being called for agents with handoffs



## Description



The `on_llm_end` hook in `RunHooks` is not being triggered when an agent uses handoffs to transfer to another agent, even though the hook is properly defined and other hooks (`on_agent_start`, `on_handoff`) are being called successfully.



## Environment



- __openai-agents version__: 0.2.11

- __Python version__: 3.11



## Expected Behavior



When an agent completes an LLM call, the `on_llm_end` hook should be triggered with the `ModelResponse` object, allowing access to the LLM's output before any handoff occurs.



## Actual Behavior



The `on_llm_end` hook is never called. Only `on_agent_start` and `on_handoff` hooks are triggered.



## Code Example



```python

from agents import Agent, RunHooks, RunContextWrapper, ModelResponse



class MyAgentHooks(RunHooks):

    async def on_agent_start(self, context, agent):

        print("✅ on_agent_start called")  # This IS called

    

    async def on_llm_start(self, context, agent):

        print("✅ on_llm_start called")  # Need to verify if this is called

    

    async def on_llm_end(self, context, agent, response: ModelResponse):

        print("❌ on_llm_end called")  # This is NEVER called

        print(f"Response: {response}")

    

    async def on_handoff(self, context, agent, source):

        print("✅ on_handoff called")  # This IS called



# Agent with handoff

next_agent = Agent(name="next_agent", instructions="...")



my_agent = Agent(

    name="my_agent",

    instructions="Output text then call handoff tool",

    hooks=MyAgentHooks(),

    handoffs=[next_agent],

)



# Run the agent

result = Runner.run_streamed(my_agent, input="test query", context=my_context)

```



## Observed Hook Execution Order



1. ✅ `on_agent_start` - Called

2. ❌ `on_llm_start` - Not verified

3. ❌ `on_llm_end` - __NOT CALLED__ (this is the issue)

---

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Escalate
