diff --git a/src/agents/pi-embedded-runner/run/attempt.test.ts b/src/agents/pi-embedded-runner/run/attempt.test.ts index 61a8b98f1e0..962eecb5ad9 100644 --- a/src/agents/pi-embedded-runner/run/attempt.test.ts +++ b/src/agents/pi-embedded-runner/run/attempt.test.ts @@ -117,6 +117,12 @@ describe("shouldCreateBundleMcpRuntimeForAttempt", () => { toolsAllow: ["memory_search", "memory_get"], }), ).toBe(false); + expect( + shouldCreateBundleMcpRuntimeForAttempt({ + toolsEnabled: true, + toolsAllow: ["bundle-mcp"], + }), + ).toBe(true); expect( shouldCreateBundleMcpRuntimeForAttempt({ toolsEnabled: true, diff --git a/src/agents/pi-embedded-runner/run/attempt.ts b/src/agents/pi-embedded-runner/run/attempt.ts index 8c8a674cb09..7a44cec7bd2 100644 --- a/src/agents/pi-embedded-runner/run/attempt.ts +++ b/src/agents/pi-embedded-runner/run/attempt.ts @@ -490,7 +490,9 @@ export function shouldCreateBundleMcpRuntimeForAttempt(params: { if (!params.toolsAllow || params.toolsAllow.length === 0) { return true; } - return params.toolsAllow.some((toolName) => toolName.includes(TOOL_NAME_SEPARATOR)); + return params.toolsAllow.some( + (toolName) => toolName === "bundle-mcp" || toolName.includes(TOOL_NAME_SEPARATOR), + ); } function collectAttemptExplicitToolAllowlistSources(params: {