clay-server 2.26.0-beta.13 → 2.26.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/sdk-bridge.js +6 -1
- package/package.json +1 -1
package/lib/sdk-bridge.js
CHANGED
|
@@ -437,7 +437,12 @@ function createSDKBridge(opts) {
|
|
|
437
437
|
session.pendingAskUser = {};
|
|
438
438
|
session.activeTaskToolIds = {};
|
|
439
439
|
session.taskIdMap = {};
|
|
440
|
-
|
|
440
|
+
// Only clear rateLimitResetsAt on genuine success (non-zero cost).
|
|
441
|
+
// When rate-limited, the SDK sends result with zero cost right after
|
|
442
|
+
// rate_limit_event; clearing here would prevent auto-continue scheduling.
|
|
443
|
+
if (parsed.total_cost_usd && parsed.total_cost_usd > 0) {
|
|
444
|
+
session.rateLimitResetsAt = null;
|
|
445
|
+
}
|
|
441
446
|
|
|
442
447
|
// Handle SDK execution errors: show the error to the user instead of
|
|
443
448
|
// silently swallowing it. These have subtype "error_during_execution".
|
package/package.json
CHANGED