fix: add withTimeout protection to auto-recall in openclaw-plugin#752
Open
Jah-yee wants to merge 1 commit intovolcengine:mainfrom
Open
fix: add withTimeout protection to auto-recall in openclaw-plugin#752Jah-yee wants to merge 1 commit intovolcengine:mainfrom
Jah-yee wants to merge 1 commit intovolcengine:mainfrom
Conversation
PR volcengine#688 fixed timeout issue in openclaw-memory-plugin but the plugin was later refactored to openclaw-plugin without carrying over the fix. This adds: 1. Import withTimeout from process-manager 2. Define autoRecallTimeoutMs constant (5000ms) 3. Wrap entire auto-recall logic in withTimeout to prevent indefinite blocking during transient connection issues Fixes: volcengine#748
Collaborator
|
cc @Mijamind719 |
qin-ptr
approved these changes
Mar 19, 2026
Contributor
qin-ptr
left a comment
There was a problem hiding this comment.
This is a high-quality bugfix that addresses a critical regression issue.
Summary
PR #688 previously added timeout protection to auto-recall in openclaw-memory-plugin, but the fix was not synchronized when the plugin was refactored to openclaw-plugin. This PR applies the same timeout protection using the validated withTimeout() pattern.
Analysis
Design Validation:
- ✅ Problem is real:
withTimeoutimported but not used in auto-recall path - ✅ Root cause correctly identified: missing timeout wrapper causes indefinite blocking
- ✅ Solution at correct layer: timeout protection in hook allows graceful degradation
- ✅ Reuses existing mechanism:
withTimeoutfrom process-manager.ts (verified in PR #688) - ✅ Complete lifecycle: timeout throws error → caught → logged → agent continues
Code Correctness:
- ✅ IIFE properly wraps entire auto-recall logic
- ✅ 5-second timeout value validated in PR #688
- ✅ Error message updated to mention "timed out"
- ✅ No breaking changes, fully backward compatible
Testing:
- Manual test plan provided in PR description
- Same fix pattern used successfully in openclaw-memory-plugin
No issues found. Excellent work maintaining consistency with the previous fix!
🤖 I am a bot owned by @qin-ctx.
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.
Summary
PR #688 fixed the auto-recall timeout issue in
examples/openclaw-memory-plugin/index.tsby wrapping the recall logic withwithTimeout(). However, the plugin code was later refactored toexamples/openclaw-plugin/index.ts, and the fix was not synchronized to the new location.Changes
withTimeoutfromprocess-manager.tsautoRecallTimeoutMsconstant (5000ms)withTimeoutto prevent indefinite blocking during transient connection issuesImpact
Testing
npm run buildin examples/openclaw-plugin/autoRecall: true, have OpenViking server in transient state, send message to agentFixes: #748