{"record":{"id":"efeed4c170c9a38c","repo":"paperclipai/paperclip","slug":"runtimeconfig-must-be-an-object","errorCode":null,"errorMessage":"runtimeConfig must be an object","messagePattern":"runtimeConfig must be an object","errorType":"http","errorClass":null,"httpStatus":422,"severity":"error","filePath":"server/src/routes/agents.ts","lineNumber":4280,"sourceCode":"          },\n          decisionNote: null,\n          decidedByUserId: null,\n          decidedAt: null,\n          updatedAt: new Date(),\n        });\n\n        if (sourceIssueIds.length > 0) {\n          await issueApprovalsSvc.linkManyForApproval(approval.id, sourceIssueIds, {\n            agentId: actor.actorType === \"agent\" ? actor.actorId : null,\n            userId: actor.actorType === \"user\" ? actor.actorId : null,\n          });\n        }\n      }\n\n      await logActivity(db, {\n        companyId,\n        actorType: actor.actorType,\n        actorId: actor.actorId,\n        agentId: actor.agentId,\n        runId: actor.runId,\n        agentApiKeyId: actor.agentApiKeyId,\n        action: \"agent.hire_created\",\n        entityType: \"agent\",\n        entityId: agent.id,\n        details: {\n          name: agent.name,\n          role: agent.role,\n          requiresApproval,\n          approvalId: approval?.id ?? null,\n          issueIds: sourceIssueIds,\n          desiredSkills: desiredSkillAssignment.desiredSkills,\n          hireFingerprint: requestFingerprint,\n        },\n      });\n      const telemetryClient = getTelemetryClient();\n      if (telemetryClient) {","sourceCodeStart":4262,"sourceCodeEnd":4298,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/agents.ts#L4262-L4298","documentation":"Shape guard on PATCH /agents/:id: the request supplies a 'runtimeConfig' that is not a plain object. Runtime config must be a keyed map (heartbeat, budget, etc.), so the update aborts with 400 rather than writing a malformed config.","triggerScenarios":"Thrown at server/src/routes/agents.ts:3794 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send runtimeConfig as a JSON object in the request body."],"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"}