@@ -430,6 +430,16 @@ func (a *sessionAgent) Run(ctx context.Context, call SessionAgentCall) (*fantasy
430430 if summarizeErr := a.Summarize(genCtx, call.SessionID, call.ProviderOptions); summarizeErr != nil {
431431 return nil, summarizeErr
432432 }
433+ // if the agent was not done...
434+ if len(currentAssistant.ToolCalls()) > 0 {
435+ existing, ok := a.messageQueue.Get(call.SessionID)
436+ if !ok {
437+ existing = []SessionAgentCall{}
438+ }
439+ call.Prompt = fmt.Sprintf("The previous session was interrupted because it got too long, the initial user request was: `%s`", call.Prompt)
440+ existing = append(existing, call)
441+ a.messageQueue.Set(call.SessionID, existing)
442+ }
433443 }
434444
435445 // release active request before processing queued messages