You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to give varying degrees of control to my agents. For example I would like a certain tool to not be available until another tool is called. Or, similarly, I don't want the agents to be able to handoff without calling a tool first.
Is there a way around this without something like this where we return from an agent?
This used to work but it no longer does. In particular, this code used to work without the special line above; then it it broke, meaning the agent would attempt to call the tool I removed, the handoff. I then added the special line and this gets me an OpenAI server error with a request ID. So it seems that changes made to tools during on_start do not take effect.
Activity
rm-openai commentedon Jun 23, 2025
Yes you can do something like this:
maininformer commentedon Jun 23, 2025
Thank you; and how would I do this on a handoff? that is an implicitly defined tool. Should I set its
is_enabledduring lifecycle calls or ...?rm-openai commentedon Jun 23, 2025
Ah. Let me add it to handoffs too.
Add is_enabled to handoffs (#925)
Add is_enabled to handoffs (openai#925)
seratch commentedon Jun 25, 2025
Fixed by #925