Hello, I looked at source and in Docs, but couldn't find a definite answer. I'm looking at the Session Lifecycle. Is the session restored from last Event or User message? I'd think Event but the docs suggest from user Message? Or last "finished" event? Can you clarify which one?
Consider this scenario:
I'm using VertexAIServiceSession for persistence. I have a complex custom agent. The agent sends multiple assistant msgs before the next user msg. It has following code:
async for event in self.subagent.run_async(ctx):
await long_function() # takes a minute to return
yield event
For the sake of the argument, long_function takes a minute to finish and produces no Events.
What happens if the application is restarted while Code execution is happening in long_function? Is the session restored from last user message? Or from last Yielded event? If from Event, is this event re-processed (that is, long_function is executed twice)? Thank you very much.