Session resumption

hi gemini team,

I have explored a session resumption mechanism, yeah it’s provide an unlimited session duration.
But I found that if I try to continue that session after period of time let’s say after 12hrs, the handle that given from last session is not working after onwords. (error : Gemini closed: BidiGenerateContent session not found)

can someone please clarify that upto how many hours session handle is valid.

Please don’t provide the documentation link as it’s not providing proper infomation regarding this

Thank you

Hey @Alay — it looks like Gemini sessions don’t stay active forever. If you’re trying to resume a session after 12 hours and getting a “session not found” error, it probably expired. A good workaround is to save the conversation and start a new session when you come back.

Thanks!