{"record":{"id":"ac8e7637db0b5bc7","repo":"paperclipai/paperclip","slug":"paperclip-runner-claude-managed-recovery-identity","errorCode":"paperclip_runner_claude_managed_recovery_identity_mismatch","errorMessage":"The persisted Claude Managed identity no longer matches its qualified profile.","messagePattern":"The persisted Claude Managed 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":228,"sourceCode":"  };\n  stored: {\n    id: string;\n    anthropicAgentId: string;\n    agentVersion: string;\n    environmentId: string;\n    betaVersion: string;\n    apiKeySecretId: string;\n  };\n}): void {\n  const { snapshot, stored } = input;\n  if (\n    snapshot.profileId !== stored.id\n    || snapshot.anthropicAgentId !== stored.anthropicAgentId\n    || snapshot.agentVersion !== stored.agentVersion\n    || snapshot.environmentId !== stored.environmentId\n    || snapshot.betaVersion !== stored.betaVersion\n  ) {\n    throw new PaperclipRunnerProviderProfileError(\n      \"paperclip_runner_claude_managed_recovery_identity_mismatch\",\n      \"The persisted Claude Managed identity no longer matches its qualified profile.\",\n    );\n  }\n  const rawBinding = asRecord(asRecord(input.adapterConfig).env).ANTHROPIC_API_KEY;\n  const boundSecretId = asRecord(rawBinding).secretId;\n  if (boundSecretId !== stored.apiKeySecretId) {\n    throw new PaperclipRunnerProviderProfileError(\n      \"paperclip_runner_claude_managed_recovery_secret_mismatch\",\n      \"The persisted Claude Managed run is not bound to its profile's current API-key secret.\",\n    );\n  }\n}\n\n/** Revalidate the operator's AWS profile revocation and immutable identity on recovery. */\nexport function assertAgentCoreProfileRecoveryBinding(input: {\n  snapshot: {\n    profileId: string;","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/native-runtime/provider-profile.ts#L210-L246","documentation":"Guard assertManagedProfileRecoveryBinding: when recovering a Claude Managed run, the persisted recovery snapshot (profileId, anthropicAgentId, agentVersion, environmentId, betaVersion) is compared field-by-field against the currently qualified stored profile; any divergence throws 'paperclip_runner_claude_managed_recovery_identity_mismatch' because the run can no longer be safely bound to the changed profile.","triggerScenarios":"Thrown at server/src/services/native-runtime/provider-profile.ts:222 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-qualify the managed profile so its identity again matches the persisted snapshot, or re-qualify and start a fresh run.","Start a new run instead of resuming, since the profile changed since the snapshot was taken.","Roll back the profile change (agent version/environment/beta) that broke binding if resumption is required."],"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"}