I’ve implemented periodic retrieve() calls to keep containers alive and avoid the 20-minute idle timeout, and this approach seems to work well in the short term.
However, I’ve also observed that even with consistent activity, containers eventually expire — possibly after around 24 hours. Not sure if anyone else has encountered this, but it would be really helpful if OpenAI could provide more concrete guidance on the full container lifecycle. It would be essential for the architectural decisions when designing long-lived agents or workflows that rely on a persistent container context.
I’ve also shared a more detailed question in this related post:
What is the best practice for keeping containers alive?
Hopefully the OpenAI team sees these related threads and can offer some clarification!