{"record":{"id":"779941be66c95bce","repo":"paperclipai/paperclip","slug":"invalid-agentcore-profile","errorCode":"invalid_agentcore_profile","errorMessage":"AWS AgentCore requires a qualified profile ID.","messagePattern":"AWS AgentCore requires a qualified profile ID\\.","errorType":"http","errorClass":"RouteError","httpStatus":400,"severity":"error","filePath":"packages/paperclip-runner/scripts/capability-issue-thread-server.mjs","lineNumber":262,"sourceCode":"    : Number(source.maxSessionListCostUsd);\n  if (provider === \"claude_managed\" && !managedProfileId) {\n    throw new RouteError(400, \"invalid_managed_profile\", \"Claude Managed requires a qualified profile ID.\");\n  }\n  if (provider === \"claude_managed\" && (!Number.isFinite(maxSessionListCostUsd) || maxSessionListCostUsd <= 0)) {\n    throw new RouteError(400, \"invalid_spend_cap\", \"Claude Managed requires a positive session spend ceiling.\");\n  }\n  const requestedAgentCoreProfileId = source.agentCoreProfileId === undefined || source.agentCoreProfileId === null\n    ? \"default\"\n    : String(source.agentCoreProfileId).trim();\n  const configuredAgentCoreProfileId = process.env.PAPERCLIP_AWS_AGENTCORE_PROFILE_ID?.trim();\n  const agentCoreProfileId = provider === \"aws_agentcore\" && requestedAgentCoreProfileId === \"default\" && configuredAgentCoreProfileId\n    ? configuredAgentCoreProfileId\n    : requestedAgentCoreProfileId;\n  const maxEstimatedSessionCostUsd = source.maxEstimatedSessionCostUsd === undefined || source.maxEstimatedSessionCostUsd === null\n    ? 1\n    : Number(source.maxEstimatedSessionCostUsd);\n  if (provider === \"aws_agentcore\" && !agentCoreProfileId) {\n    throw new RouteError(400, \"invalid_agentcore_profile\", \"AWS AgentCore requires a qualified profile ID.\");\n  }\n  if (provider === \"aws_agentcore\" && (!Number.isFinite(maxEstimatedSessionCostUsd) || maxEstimatedSessionCostUsd <= 0)) {\n    throw new RouteError(400, \"invalid_spend_cap\", \"AWS AgentCore requires a positive session spend ceiling.\");\n  }\n  const suppliedLifecycle = source.lifecyclePolicy && typeof source.lifecyclePolicy === \"object\"\n    ? source.lifecyclePolicy\n    : source;\n  const lifecycleMode = suppliedLifecycle.mode === undefined\n    ? source.lifecycleMode === undefined ? \"warm\" : String(source.lifecycleMode).trim()\n    : String(suppliedLifecycle.mode).trim();\n  if (lifecycleMode !== \"per_turn\" && lifecycleMode !== \"warm\") {\n    throw new RouteError(400, \"invalid_lifecycle_mode\", \"Execution mode must be per_turn or warm.\");\n  }\n  let lifecyclePolicy;\n  if (lifecycleMode === \"per_turn\") {\n    lifecyclePolicy = { mode: \"per_turn\", idleTimeoutMs: null };\n  } else {\n    const rawIdleTimeout = suppliedLifecycle.idleTimeoutMs === undefined","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/paperclip-runner/scripts/capability-issue-thread-server.mjs#L244-L280","documentation":"Guard in harnessConfiguration: an aws_agentcore request resolved to an empty agentCoreProfileId (payload omitted it and no default qualified profile was configured), so RouteError(400,'invalid_agentcore_profile') is thrown. AWS AgentCore cannot launch without an identified remote-agent profile.","triggerScenarios":"Thrown at packages/paperclip-runner/scripts/capability-issue-thread-server.mjs:262 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty agentCoreProfileId in the harness configuration payload.","Configure the AgentCore profile server-side so the 'default' id resolves.","Choose a different provider (codex, opencode, acpx) if no AgentCore profile exists."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-09-02T18:44:00.616Z","contentChangedAt":"2026-09-02T18:44:00.616Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}