diff --git a/src/plugins/wired-hooks-after-tool-call.e2e.test.ts b/src/plugins/wired-hooks-after-tool-call.e2e.test.ts index 8ec506a5d33..022a209f179 100644 --- a/src/plugins/wired-hooks-after-tool-call.e2e.test.ts +++ b/src/plugins/wired-hooks-after-tool-call.e2e.test.ts @@ -114,7 +114,7 @@ describe("after_tool_call hook wiring", () => { const event = firstCall?.[0] as | { toolName?: string; params?: unknown; error?: unknown; durationMs?: unknown } | undefined; - const context = firstCall?.[1] as { toolName?: string } | undefined; + const context = firstCall?.[1] as { toolName?: string; sessionKey?: string } | undefined; expect(event).toBeDefined(); expect(context).toBeDefined(); if (!event || !context) { @@ -125,6 +125,7 @@ describe("after_tool_call hook wiring", () => { expect(event.error).toBeUndefined(); expect(typeof event.durationMs).toBe("number"); expect(context.toolName).toBe("read"); + expect(context.sessionKey).toBe("test-session"); }); it("includes error in after_tool_call event on tool failure", async () => {