fix(memory): prevent monologue crash on recall timeout#1486
Open
mdnaimul22 wants to merge 4 commits intoagent0ai:mainfrom
Open
fix(memory): prevent monologue crash on recall timeout#1486mdnaimul22 wants to merge 4 commits intoagent0ai:mainfrom
mdnaimul22 wants to merge 4 commits intoagent0ai:mainfrom
Conversation
…matted requests (Fixes agent0ai#1349)
… instructions and usage examples
Wrapped memory recall task await in a try-except block to handle asyncio.TimeoutError and CancelledError gracefully. Prevents the agent loop from crashing when vector search takes too long.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a critical issue where the agent monologue loop crashes if a memory recall similarity search times out (30s default).
Changes
plugins/_memory/extensions/python/message_loop_prompts_after/_91_recall_wait.pywithin a try-except block.asyncio.TimeoutErrorandCancelledErrorgracefully by logging a warning instead of crashing the process.Impact
Improved resilience and stability of the agent when working with large memory vector stores or slow embedding providers.