From 70cfdc890b78e6004e76ea43cfc35295b6ca1785 Mon Sep 17 00:00:00 2001 From: Tak Hoffman <781889+Takhoffman@users.noreply.github.com> Date: Fri, 10 Apr 2026 20:10:22 -0500 Subject: [PATCH] fix: preserve status store path in info wrapper --- src/auto-reply/reply/commands-info.test.ts | 20 ++++++++++++++++++++ src/auto-reply/reply/commands-info.ts | 1 + 2 files changed, 21 insertions(+) diff --git a/src/auto-reply/reply/commands-info.test.ts b/src/auto-reply/reply/commands-info.test.ts index 88ca04a5f19..60a25ab4448 100644 --- a/src/auto-reply/reply/commands-info.test.ts +++ b/src/auto-reply/reply/commands-info.test.ts @@ -201,6 +201,26 @@ describe("info command handlers", () => { ); }); + it("preserves the shared session store path when routing /status", async () => { + const params = buildInfoParams( + "/status", + { + commands: { text: true }, + channels: { whatsapp: { allowFrom: ["*"] } }, + } as OpenClawConfig, + ); + params.storePath = "/tmp/target-session-store.json"; + + const statusResult = await handleStatusCommand(params, true); + + expect(statusResult?.shouldContinue).toBe(false); + expect(vi.mocked(buildStatusReply)).toHaveBeenCalledWith( + expect.objectContaining({ + storePath: "/tmp/target-session-store.json", + }), + ); + }); + it("uses the canonical target session agent when listing /commands", async () => { const { handleCommandsListCommand } = await import("./commands-info.js"); const params = buildInfoParams("/commands", { diff --git a/src/auto-reply/reply/commands-info.ts b/src/auto-reply/reply/commands-info.ts index 0de074c910d..4bb40b341cc 100644 --- a/src/auto-reply/reply/commands-info.ts +++ b/src/auto-reply/reply/commands-info.ts @@ -195,6 +195,7 @@ export const handleStatusCommand: CommandHandler = async (params, allowTextComma sessionKey: params.sessionKey, parentSessionKey: params.sessionEntry?.parentSessionKey ?? params.ctx.ParentSessionKey, sessionScope: params.sessionScope, + storePath: params.storePath, provider: params.provider, model: params.model, contextTokens: params.contextTokens,