paperclipai/paperclip · error

Invalid search query

Error message

Invalid search query

What it means

400 from the main company search route: companySearchQuerySchema failed to parse the query string; the schema's first issue message is preferred with this text as fallback.

Source

Thrown at server/src/routes/issues.ts:6053

      eventMessage: "run interrupted by board comment",
      eventPayload: {
        issueId: input.issueId,
        source: "issue_comment_interrupt",
        interruptedByActorType: input.actor.actorType,
        interruptedByActorId: input.actor.actorId,
      },
    };
  }

  /**
   * Refuse an agent creating a child issue assigned to the agent that created
   * a still-open ancestor in the same chain. That shape is a delegation cycle
   * (A delegates to B, B delegates the same work back to A): each agent lacks
   * something the other assumed it had, the chain of blocked issues grows,
   * and no one tells the human. Humans are unaffected, and closed ancestors
   * do not count — re-engaging the creator of finished work is normal.
   */
  async function assertNoAgentDelegationCycle(input: {
    actorType: string;
    parentIssueId: string | null | undefined;
    assigneeAgentId: string | null | undefined;
  }) {
    if (input.actorType !== "agent") return;
    if (!input.parentIssueId || !input.assigneeAgentId) return;
    const ancestor = await svc.findOpenAncestorCreatedByAgent(input.parentIssueId, input.assigneeAgentId);
    if (!ancestor) return;
    throw conflict(
      `Delegation cycle: ${ancestor.identifier ?? "an ancestor issue"} in this chain was created by the agent this child would be assigned to. ` +
        "Complete the remaining work in your own issue, leave the child unassigned, or escalate to a board operator — do not delegate the work back to the agent that delegated it to you.",
      {
        code: "delegation_cycle",
        ancestorIssueId: ancestor.id,
        assigneeAgentId: input.assigneeAgentId,
      },
    );
  }

View on GitHub (pinned to 01ad858492)

Solutions

  1. Fix the offending parameter to satisfy the constraint stated in the error message (type, range, or allowed values), then retry.
  2. Refer to the route's request validation in the named file and the shared validators for the accepted format.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/issues.ts:5747 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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