fix: add withTimeout protection to auto-recall in openclaw-plugin#752
fix: add withTimeout protection to auto-recall in openclaw-plugin#752Jah-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
|
cc @Mijamind719 |
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.
|
A timeout mechanism is implemented in requests; please reuse this logic? |
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