{"record":{"id":"c3e9802d6b634eec","repo":"paperclipai/paperclip","slug":"invalid-search-query","errorCode":null,"errorMessage":"Invalid search query","messagePattern":"Invalid search query","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":6053,"sourceCode":"      eventMessage: \"run interrupted by board comment\",\n      eventPayload: {\n        issueId: input.issueId,\n        source: \"issue_comment_interrupt\",\n        interruptedByActorType: input.actor.actorType,\n        interruptedByActorId: input.actor.actorId,\n      },\n    };\n  }\n\n  /**\n   * Refuse an agent creating a child issue assigned to the agent that created\n   * a still-open ancestor in the same chain. That shape is a delegation cycle\n   * (A delegates to B, B delegates the same work back to A): each agent lacks\n   * something the other assumed it had, the chain of blocked issues grows,\n   * and no one tells the human. Humans are unaffected, and closed ancestors\n   * do not count — re-engaging the creator of finished work is normal.\n   */\n  async function assertNoAgentDelegationCycle(input: {\n    actorType: string;\n    parentIssueId: string | null | undefined;\n    assigneeAgentId: string | null | undefined;\n  }) {\n    if (input.actorType !== \"agent\") return;\n    if (!input.parentIssueId || !input.assigneeAgentId) return;\n    const ancestor = await svc.findOpenAncestorCreatedByAgent(input.parentIssueId, input.assigneeAgentId);\n    if (!ancestor) return;\n    throw conflict(\n      `Delegation cycle: ${ancestor.identifier ?? \"an ancestor issue\"} in this chain was created by the agent this child would be assigned to. ` +\n        \"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.\",\n      {\n        code: \"delegation_cycle\",\n        ancestorIssueId: ancestor.id,\n        assigneeAgentId: input.assigneeAgentId,\n      },\n    );\n  }","sourceCodeStart":6035,"sourceCodeEnd":6071,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L6035-L6071","documentation":"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.","triggerScenarios":"Thrown at server/src/routes/issues.ts:5747 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the offending parameter to satisfy the constraint stated in the error message (type, range, or allowed values), then retry.","Refer to the route's request validation in the named file and the shared validators for the accepted format."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}