diff --git a/CHANGELOG.md b/CHANGELOG.md index d01757ef9ae..fbb14c3a128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -158,6 +158,7 @@ Docs: https://docs.openclaw.ai - Providers: preserve non-OK `text/event-stream` response bodies so provider HTTP errors keep their JSON detail instead of collapsing to generic streaming failures. Fixes #78180. - Gateway/auth: make explicit `trusted-proxy` mode fail closed instead of accepting local password fallback credentials after trusted-proxy identity checks fail. Fixes #78684. - Active memory: treat Google Chat `spaces/...` conversation ids as scoped targets instead of runnable channel names so recall runs no longer fail bundled-plugin dirName validation. Fixes #78918. +- Active memory: make `/active-memory status` honor the configured agent allowlist instead of reporting on for agents where recall is disabled. Fixes #78986. - Tools/session status: render the active heartbeat/run model for `session_status({"sessionKey":"current"})` instead of falling back to the persisted session default. Fixes #77493. - Doctor/secrets: allow safe inherited exec SecretRef `passEnv` names such as `HOME` while still blocking dangerous runtime env hooks. Fixes #78216. - Chat commands: make `/model default` reset the session model override instead of treating it as a literal model name. Fixes #78182. diff --git a/extensions/active-memory/index.test.ts b/extensions/active-memory/index.test.ts index 9ccac0244f7..8a40f901b34 100644 --- a/extensions/active-memory/index.test.ts +++ b/extensions/active-memory/index.test.ts @@ -346,6 +346,28 @@ describe("active-memory plugin", () => { expect(runEmbeddedPiAgent).toHaveBeenCalledTimes(1); }); + it("reports session status off when the current agent is outside the active-memory allowlist (#78986)", async () => { + api.pluginConfig = { + agents: ["sandbox"], + logging: true, + }; + plugin.register(api as unknown as OpenClawPluginApi); + + const statusResult = await registeredCommands["active-memory"].handler({ + channel: "webchat", + isAuthorizedSender: true, + sessionKey: "agent:main:main", + args: "status", + commandBody: "/active-memory status", + config: {}, + requestConversationBinding: async () => ({ status: "error", message: "unsupported" }), + detachConversationBinding: async () => ({ removed: false }), + getCurrentConversationBinding: async () => null, + }); + + expect(statusResult.text).toBe("Active Memory: off for this session."); + }); + it("supports an explicit global active-memory config toggle", async () => { const command = registeredCommands["active-memory"]; diff --git a/extensions/active-memory/index.ts b/extensions/active-memory/index.ts index d7f4ad9e2d4..ec14a051546 100644 --- a/extensions/active-memory/index.ts +++ b/extensions/active-memory/index.ts @@ -2863,6 +2863,10 @@ export default definePluginEntry({ text: "Active Memory: session toggle unavailable because this command has no session context.", }; } + const commandAgentId = resolveStatusUpdateAgentId({ sessionKey }); + if (!isEnabledForAgent(config, commandAgentId)) { + return { text: "Active Memory: off for this session." }; + } if (action === "status") { const disabled = await isSessionActiveMemoryDisabled({ api, sessionKey }); return {