diff --git a/cmd/core-runtime/main.go b/cmd/core-runtime/main.go index ee7ca15..edf07b1 100644 --- a/cmd/core-runtime/main.go +++ b/cmd/core-runtime/main.go @@ -512,12 +512,19 @@ func main() { var previousTask *interaction.HumanUtterance var conversationHistory []interaction.HumanUtterance if request.ConversationID != "" { - conversationHistory, _ = interactionRepository.Utterances(r.Context(), conversation.ID) + var historyErr error + conversationHistory, historyErr = interactionRepository.Utterances(r.Context(), conversation.ID) + if historyErr != nil { + log.Printf("interaction conversation history unavailable: %v", historyErr) + } } // Keep durable user context available even when the web client carries a // conversation ID; a new or rotated conversation must not erase learned // preferences. - recentUserHistory, _ := interactionRepository.RecentUtterancesForPrincipal(r.Context(), session.PrincipalID, 64) + recentUserHistory, historyErr := interactionRepository.RecentUtterancesForPrincipal(r.Context(), session.PrincipalID, 64) + if historyErr != nil { + log.Printf("interaction principal history unavailable: %v", historyErr) + } conversationHistory = append(conversationHistory, recentUserHistory...) if request.ConversationID != "" && interactiondomain.IsRetryRequest(utterance.Content) { if len(conversationHistory) > 0 {