{"record":{"id":"6dca145fa78fb64f","repo":"paperclipai/paperclip","slug":"query-parameter-path-is-required","errorCode":null,"errorMessage":"Query parameter 'path' is required","messagePattern":"Query parameter 'path' is required","errorType":"http","errorClass":null,"httpStatus":422,"severity":"error","filePath":"server/src/routes/agents.ts","lineNumber":4135,"sourceCode":"      companyId,\n      hireInput.adapterType,\n      requestedAdapterConfig,\n      withDefaultRoleSkillSelections(\n        normalizeDesiredSkillSelections(Array.isArray(requestedDesiredSkills) ? requestedDesiredSkills : undefined),\n        defaultRoleSkillSelections(hireInput.role, hireInput.adapterType),\n      ),\n      \"add\",\n    );\n    const normalizedAdapterConfig = await normalizeMediatedAdapterConfigForPersistence({\n      companyId,\n      adapterType: hireInput.adapterType,\n      adapterConfig: desiredSkillAssignment.adapterConfig,\n    });\n    const normalizedRuntimeConfig = normalizeNewAgentRuntimeConfig(hireInput.runtimeConfig);\n    const normalizedHireInput = {\n      ...hireInput,\n      adapterConfig: normalizedAdapterConfig,\n      runtimeConfig: normalizedRuntimeConfig,\n    };\n\n    const company = await db\n      .select()\n      .from(companies)\n      .where(eq(companies.id, companyId))\n      .then((rows) => rows[0] ?? null);\n    if (!company) {\n      res.status(404).json({ error: \"Company not found\" });\n      return;\n    }\n\n    // Idempotency within a run: if this run already created a hire from this\n    // exact request, return that hire instead of creating a duplicate. The\n    // creating agent cannot pause or delete its own hire (board-only), so a\n    // doubled hire would otherwise strand a phantom teammate the board never\n    // approved. The lookup, the create and the activity record run under one\n    // lock per company + run, so two overlapping retries cannot both miss.","sourceCodeStart":4117,"sourceCodeEnd":4153,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/agents.ts#L4117-L4153","documentation":"Param guard on GET /agents/:id/instructions-bundle/file: the required 'path' query parameter is missing or not a string, so the route cannot locate a file within the agent's instructions bundle and returns 400.","triggerScenarios":"Thrown at server/src/routes/agents.ts:3662 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the 'path' query parameter in the request."],"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-14T05:17:10.506Z"}