paperclipai/paperclip · error · PipelinePermissionPreflightError

pipeline_permission_preflight_failed

pipeline_permission_preflight_failed

Error message

Pipeline automation assignee lacks pipelines:write on the target pipeline

What it means

Permission guard run when a pipeline automation executes: the principal (agent/board identity) linked to the automation does not hold pipelines:write on the pipeline the automation targets. Fires to prevent automations from escalating privileges beyond their actor's grants; the automation's principalId/targetPipelineId pair is at fault.

Source

Thrown at server/src/services/pipelines.ts:2272

    dbOrTx: PipelineDb,
    companyId: string,
    config: PipelineBreakdownConfig,
  ) {
    const targetPipeline = await getPipelineOrThrow(dbOrTx, companyId, config.targetPipelineId);
    const targetStage = await getStageByKeyOrThrow(dbOrTx, targetPipeline.id, config.targetStageKey);
    return { targetPipeline, targetStage };
  }

  async function assertAutomationAssigneeCanWriteTargetPipeline(input: {
    companyId: string;
    principalId: string | null;
    caseId: string;
    stageId: string;
    automationId: string;
    targetPipelineId: string;
  }) {
    if (!input.principalId) {
      throw new PipelinePermissionPreflightError({
        ...input,
        principalId: "unassigned",
        permissionKey: PIPELINE_WRITE_PERMISSION,
        reason: "missing_assignee",
        explanation: "Pipeline automation has no routine assignee to authorize target-pipeline writes.",
      });
    }
    const decision = await authorization.decide({
      actor: {
        type: "agent",
        agentId: input.principalId,
        companyId: input.companyId,
        source: "agent_key",
      },
      action: PIPELINE_WRITE_PERMISSION,
      resource: { type: "company", companyId: input.companyId },
      scope: { pipelineId: input.targetPipelineId },
    });

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Grant the automation assignee pipelines:write permission on the target pipeline, or choose an assignee that has it.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/pipelines.ts:2272 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/a58c7ae8ed14138c. Report an issue: GitHub.