fix (memory/compaction): inject runtime date-time into memory flush prompt

This commit is contained in:
Vignesh Natarajan
2026-02-15 19:20:28 -08:00
parent a61c2dc4bd
commit ffbcb37342
2 changed files with 40 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ import { registerAgentRunContext } from "../../infra/agent-events.js";
import { buildThreadingToolContext, resolveEnforceFinalTag } from "./agent-runner-utils.js";
import {
resolveMemoryFlushContextWindowTokens,
resolveMemoryFlushPromptForRun,
resolveMemoryFlushSettings,
shouldRunMemoryFlush,
} from "./memory-flush.js";
@@ -133,7 +134,10 @@ export async function runMemoryFlushIfNeeded(params: {
agentDir: params.followupRun.run.agentDir,
config: params.followupRun.run.config,
skillsSnapshot: params.followupRun.run.skillsSnapshot,
prompt: memoryFlushSettings.prompt,
prompt: resolveMemoryFlushPromptForRun({
prompt: memoryFlushSettings.prompt,
cfg: params.cfg,
}),
extraSystemPrompt: flushSystemPrompt,
ownerNumbers: params.followupRun.run.ownerNumbers,
enforceFinalTag: resolveEnforceFinalTag(params.followupRun.run, provider),