diff --git a/src/gateway/tools-invoke-http.test.ts b/src/gateway/tools-invoke-http.test.ts index 5db5d023170..f4cc84e98b6 100644 --- a/src/gateway/tools-invoke-http.test.ts +++ b/src/gateway/tools-invoke-http.test.ts @@ -447,6 +447,7 @@ describe("POST /tools/invoke", () => { toolName: "agents_list", ctx: expect.objectContaining({ agentId: "main", + config: cfg, sessionKey: "agent:main:main", loopDetection: { warnAt: 3 }, }), @@ -995,6 +996,7 @@ describe("tools.invoke Gateway RPC", () => { toolCallId: "rpc-rpc-tool-test", ctx: expect.objectContaining({ agentId: "main", + config: cfg, sessionKey: "agent:main:main", }), }), diff --git a/src/gateway/tools-invoke-shared.ts b/src/gateway/tools-invoke-shared.ts index cb815fbd291..8aebbcaa703 100644 --- a/src/gateway/tools-invoke-shared.ts +++ b/src/gateway/tools-invoke-shared.ts @@ -254,6 +254,7 @@ export async function invokeGatewayTool(params: { toolCallId, ctx: { agentId, + config: params.cfg, sessionKey, loopDetection: resolveToolLoopDetectionConfig({ cfg: params.cfg, agentId }), },