Any way to duplicate a Thread?

I want to be able to ask our Code Interpreter Assistant to give me the code used to arrive at an answer. But I don’t want that to affect the thread history for the user if they want to ask more questions.

Simply grabbing the RunSteps doesn’t work, because it seems like the code for each RunStep almost act as cells inside a Python Notebook, building on the last RunStep. But when you ask the Assistant, it is able to intelligently include the relevant portions of the code, rather than naively including all the steps.

It doesn’t look like you can create Steps programmatically either, I assume to avoid being able to maliciously infiltrate the environment that the code runs in


Nope. No duplicating or snapshot. No branching. No editing. No retrying. No re-creating. No ability to place assistant replies in a new thread. No ability to get unseen tool messages. No limiting or expiring. No obsoleting uploaded attached files. No observing what the AI is sending.

Assistants come with a mantra that as an application developer, you are not to be trusted with an AI.

Chat Completions can be turned into code interpreter, just by putting hand-specified tools before the API’s injection of the dummy function you wrote. Then doing stuff with the output. And rejecting OpenAI’s “tools” and using functions.


I would love to see this. There could be some really good applications to cloning a thread state for later.

It seems like can be done using thread create and message add methods . Or am I missing something?

You can only add user messages. Assistant role is blocked, so you cannot re-create a conversation. There are also tool call and return messages completely blocked.

Assistants is a denial machine.

Edit: assistant role messages can now be placed in a thread.

1 Like