How to "force expire" a run stuck in cancelling?

Hi everyone,

Is there a way to force expire a run that is stuck in “cancelling”?

I am experiencing an issue similar to the one discussed in this thread “(…) cancelling a run wait until expired for several minutes”: Often, a run remains in “cancelling” for about 2-5 minutes until it expires and I cannot initiate any other runs in the same thread during this time.

Does anyone know of an API tool or method to “force expire” a run? Or how do you manage to cancel a run and still proceed with creating a new run in a thread with the same context without any potential issues described above?

Thank you for any insights or suggestions!

Ciao
juicydust

2 Likes

Same here, still looking for a way to immediately terminate/force cancel a run.

Only alternative solution for now seem to be starting a new thread but it’s a mess to manage as you’d have to resubmit the context, relink an eventual vector store if you handle user uploaded files etc…
or you don’t care about your user and display a crappy error message “please come back in 5 to 10min to retry or start a new session”.
Either way, not an ideal situation

1 Like

Any updates on this since November? I’m still getting long cancel times and I’m wondering wether the issue lies with me or not

Hi, bumping this issue again. Are there any updates on fixes for this? Or suggestions for how to prevent/workaround it? I would prefer to not have to recreate the thread.

Seems like people have been facing this issue for a while based on the following threads:

  1. assistant-api-cancelling-a-run-wait-until-expired-for-several-minutes
  2. runstatus-stay-on-queued-cancelling
    Thanks!

Getting this most times when cancelling runs lately. Hopeful for fix/workaround also.

Having the same issue here. A immediate reliable cancel would be VERY helpful

1 Like

I find that if I cancel a Run that is in the queued status it reliable deadlocks.

I was able to work around this by waiting for the Run to leave the queued status before cancelling it.