Skip to content

Commit 0961640

Browse files
committed
fix(memory): add grace buffer beyond configured QMD timeout (fixes #91947)
1 parent 381d984 commit 0961640

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

extensions/memory-core/src/tools.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ type MemorySearchToolResult =
4646

4747
const MEMORY_SEARCH_TOOL_TIMEOUT_MS = 15_000;
4848
const MEMORY_SEARCH_TOOL_COOLDOWN_MS = 60_000;
49+
const QMD_TOOL_DEADLINE_GRACE_MS = 10_000;
4950

5051
const memorySearchToolCooldowns = new Map<string, { until: number; error: string }>();
5152

@@ -382,7 +383,7 @@ export function createMemorySearchTool(options: {
382383

383384
const effectiveTimeoutMs = Math.max(
384385
MEMORY_SEARCH_TOOL_TIMEOUT_MS,
385-
cfg.memory?.qmd?.limits?.timeoutMs ?? 0,
386+
(cfg.memory?.qmd?.limits?.timeoutMs ?? 0) + QMD_TOOL_DEADLINE_GRACE_MS,
386387
);
387388
const outcome = await runMemorySearchToolWithDeadline({
388389
timeoutMs: effectiveTimeoutMs,

0 commit comments

Comments
 (0)