From 44d9d13fcfc8aae32cedaa7e7e9b054ba18866e6 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 2 Mar 2026 12:23:25 -0800 Subject: [PATCH] hooks: pass sessionKey to embedded after tool call context --- src/agents/pi-embedded-subscribe.handlers.tools.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agents/pi-embedded-subscribe.handlers.tools.ts b/src/agents/pi-embedded-subscribe.handlers.tools.ts index 18dc11193f0..e41346a9e24 100644 --- a/src/agents/pi-embedded-subscribe.handlers.tools.ts +++ b/src/agents/pi-embedded-subscribe.handlers.tools.ts @@ -427,7 +427,7 @@ export async function handleToolExecutionEnd( .runAfterToolCall(hookEvent, { toolName, agentId: undefined, - sessionKey: undefined, + sessionKey: ctx.params.sessionKey, }) .catch((err) => { ctx.log.warn(`after_tool_call hook failed: tool=${toolName} error=${String(err)}`);