fix(cli): skip memory eager context warmup

This commit is contained in:
Neerav Makwana
2026-04-27 21:22:57 -04:00
committed by Peter Steinberger
parent 1945389374
commit 1106cc7fd2
4 changed files with 6 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ describe("agents/context eager warmup", () => {
it.each([
["models", ["node", "openclaw", "models", "set", "openai/gpt-5.4"]],
["agent", ["node", "openclaw", "agent", "--message", "ok"]],
["memory", ["node", "openclaw", "memory", "search", "--json"]],
])("does not eager-load config for %s commands on import", async (_label, argv) => {
process.argv = argv;
await importFreshModule(import.meta.url, `./context.js?scope=${_label}`);

View File

@@ -222,6 +222,9 @@ describe("lookupContextTokens", () => {
expect(shouldEagerWarmContextWindowCache(["node", "openclaw", "logs", "--limit", "5"])).toBe(
false,
);
expect(
shouldEagerWarmContextWindowCache(["node", "openclaw", "memory", "search", "--json"]),
).toBe(false);
expect(shouldEagerWarmContextWindowCache(["node", "openclaw", "status", "--json"])).toBe(false);
expect(shouldEagerWarmContextWindowCache(["node", "openclaw", "sessions", "--json"])).toBe(
false,

View File

@@ -151,6 +151,7 @@ const SKIP_EAGER_WARMUP_PRIMARY_COMMANDS = new Set([
"health",
"hooks",
"logs",
"memory",
"models",
"pairing",
"plugins",