Skip to content

Commit b5bc752

Browse files
fix(active-memory): isolate recall lane
Active Memory recall now runs on its own queue lane instead of sharing the parent prompt-build lane.\n\nValidation:\n- git diff --check\n- node scripts/run-vitest.mjs extensions/active-memory/index.test.ts -t "runs recall on a dedicated active-memory lane"\n- fresh local gateway smoke with Active Memory + Memory Core + loopback OpenAI-compatible model: HTTP 200, active-memory start/done, recall elapsedMs=209\n\nFixes #79026.\nRelated: #72015.
1 parent 2cb8ac1 commit b5bc752

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

extensions/active-memory/index.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,20 @@ describe("active-memory plugin", () => {
413413
expect(lastEmbeddedRunParams().authProfileFailurePolicy).toBe("local");
414414
});
415415

416+
it("runs recall on a dedicated active-memory lane", async () => {
417+
await hooks.before_prompt_build(
418+
{ prompt: "what wings should i order?", messages: [] },
419+
{
420+
agentId: "main",
421+
trigger: "user",
422+
sessionKey: "agent:main:main",
423+
messageProvider: "webchat",
424+
},
425+
);
426+
427+
expect(lastEmbeddedRunParams().lane).toBe("active-memory");
428+
});
429+
416430
it("registers a session-scoped active-memory toggle command", async () => {
417431
const command = registeredCommands["active-memory"];
418432
const sessionKey = "agent:main:active-memory-toggle";

extensions/active-memory/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const DEFAULT_SETUP_GRACE_TIMEOUT_MS = 0;
4444
const DEFAULT_QUERY_MODE = "recent" as const;
4545
const DEFAULT_QMD_SEARCH_MODE = "search" as const;
4646
const DEFAULT_TRANSCRIPT_DIR = "active-memory";
47+
const ACTIVE_MEMORY_RECALL_LANE = "active-memory";
4748
const DEFAULT_CIRCUIT_BREAKER_MAX_TIMEOUTS = 3;
4849
const DEFAULT_CIRCUIT_BREAKER_COOLDOWN_MS = 60_000;
4950
const DEFAULT_ACTIVE_MEMORY_TOOLS_ALLOW = ["memory_search", "memory_get"] as const;
@@ -2540,6 +2541,7 @@ async function runRecallSubagent(params: {
25402541
prompt,
25412542
provider: modelRef.provider,
25422543
model: modelRef.model,
2544+
lane: ACTIVE_MEMORY_RECALL_LANE,
25432545
timeoutMs: embeddedTimeoutMs,
25442546
runId: subagentSessionId,
25452547
trigger: "manual",

0 commit comments

Comments
 (0)