{"record":{"id":"32df9b492dd5a4d2","repo":"paperclipai/paperclip","slug":"paperclip-runner-aws-agentcore-recovery-identity-m","errorCode":"paperclip_runner_aws_agentcore_recovery_identity_mismatch","errorMessage":"The persisted AWS AgentCore identity no longer matches its qualified profile.","messagePattern":"The persisted AWS AgentCore identity no longer matches its qualified profile\\.","errorType":"error_code","errorClass":"PaperclipRunnerProviderProfileError","httpStatus":null,"severity":"error","filePath":"server/src/services/native-runtime/provider-profile.ts","lineNumber":291,"sourceCode":"    \"harnessArn\",\n    \"harnessVersion\",\n    \"endpointArn\",\n    \"endpointQualifier\",\n    \"agentRuntimeArn\",\n    \"memoryArn\",\n    \"memoryId\",\n    \"invocationRoleArn\",\n    \"contextBucket\",\n    \"contextPrefix\",\n    \"contextKmsKeyArn\",\n    \"qualificationRevision\",\n    \"eventExpiryDays\",\n  ] as const;\n  if (\n    snapshot.profileId !== stored.id\n    || fields.some((field) => snapshot[field] !== configuration[field])\n  ) {\n    throw new PaperclipRunnerProviderProfileError(\n      \"paperclip_runner_aws_agentcore_recovery_identity_mismatch\",\n      \"The persisted AWS AgentCore identity no longer matches its qualified profile.\",\n    );\n  }\n}\n\n/**\n * Resolve the immutable provider identity used for a fresh Paperclip Runner\n * selection. The persisted adapterConfig is the authority; runtimeConfig is\n * deliberately not consulted so model-profile or migration metadata cannot\n * silently switch the harness selected for a run.\n */\nexport function resolvePaperclipRunnerProviderProfile(\n  adapterConfig: unknown,\n): PaperclipRunnerProviderProfile {\n  const config = asRecord(adapterConfig);\n  const candidate = config.provider ?? \"codex\";\n  if (!isPaperclipRunnerProvider(candidate)) {","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/native-runtime/provider-profile.ts#L273-L309","documentation":"Guard assertAgentCoreProfileRecoveryBinding: a recovering AWS AgentCore run's snapshot (profileId plus harnessArn, endpointArn, agentRuntimeArn, memory ARNs, context bucket/KMS, qualificationRevision, etc.) must exactly match the profile's current configuration; any drift throws 'paperclip_runner_aws_agentcore_recovery_identity_mismatch' because the underlying AgentCore resources changed and resumption would be unbound.","triggerScenarios":"Thrown at server/src/services/native-runtime/provider-profile.ts:285 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-qualify the AgentCore profile and start a fresh run instead of recovering the stale one.","Restore the changed infrastructure fields (harness/endpoint/memory/context) to their snapshot values if resumption is required.","Verify which field diverged by diffing the snapshot against the profile configuration."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-02T18:44:00.616Z","contentChangedAt":"2026-09-02T18:44:00.616Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}