diff --git a/packages/paperclip-runner/src/drivers/acpx/runtime-host.ts b/packages/paperclip-runner/src/drivers/acpx/runtime-host.ts index ec3229985b4..1f2d83919c2 100644 --- a/packages/paperclip-runner/src/drivers/acpx/runtime-host.ts +++ b/packages/paperclip-runner/src/drivers/acpx/runtime-host.ts @@ -412,7 +412,12 @@ export class AcpxRuntimeHost { ...(options.providerPolicy === undefined ? {} : { providerPolicy: { ...options.providerPolicy, systemInstructions: boundedInstructions(options.systemInstructions), - protectedPaths: [...(options.providerPolicy.protectedPaths ?? []), dirname(installation.agentServerPackageJsonPath)], + protectedPaths: [ + ...(options.providerPolicy.protectedPaths ?? []), + ...(installation.agentServerPackageJsonPath === null + ? [] + : [dirname(installation.agentServerPackageJsonPath)]), + ], } }), }), dependencies.retainAdmissionCleanup,