Two assistants can share the thread?

I am facing an annoying issue. I have one assistant calling another. They share the same thread.
When I call just one, it works fine. When I call one that calls another, the status will come undefined. It is very annoying.
I am going to run some tests by creating a second thread, one for each assistant.
When the assistant calls a function that is not an assistant two, it works fine. The issue is when the function called is actually a second assistant sharing the same thread.
Any thoughts?

Solution

It tooks me days, and money, but here goes the answer.

You cannot use the same thread, sadly. It seems the thread is locked somehow. I have created a second thread, now it seems to work.
Thus: one assistant → one thread. Do not use the same thread.

2 Likes

A thread is in progress and locked until you provide a tool return value, which naturally has the original specified assistant responding.

At that stage, there is an internal assistant-written message that is sending to the tool. You are also on some unneeded timer to return a value before it is blocked.

“Turning over the answering” to another AI can be copying some of the recent user/assistant turns out of the conversation and making a new thread to run on the new assistant. Return its expert answer.

1 Like

See that it does not show in_progress, it shows undefined.
I have also tried for testing creating a thread with one assistant, and landing to another, by running one after another. My impression is: the thread is somehow locked for one assistant, even though, it does not seem so.
I am going to experiment with two threads, one for each assistant.
I know when you ask for a state, it will say in_progress, in this case, it will say undefined.
I have seen this issue when using GPT 4o with assistantv1. I have already shifted all the assistant to v2.

My initial idea was an unique thread, with two assistant working on it. It would be a log. Thread handle better logs, they were optmized for that.