Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(extract-atoms): drain failure guard keeps request_id and code on typed records (#7514)

garrytand237ca5a4c22
diff --git a/src/core/cycle/extract-atoms-drain.ts b/src/core/cycle/extract-atoms-drain.ts
index 35d45d77c8..9387cb2403 100644
--- a/src/core/cycle/extract-atoms-drain.ts
+++ b/src/core/cycle/extract-atoms-drain.ts
@@ -354,7 +354,7 @@ export async function runExtractAtomsDrain(
// (the #4539 shape) still contribute to the total via failureCount.
const batchFailures = Array.isArray(r.failures)
? r.failures.filter(
- (f): f is { source: string; reason: string } =>
+ (f): f is { source: string; reason: string; request_id?: string; code?: string } =>
f != null &&
typeof f === 'object' &&
typeof f.source === 'string' &&