{"record":{"id":"81e358b88610cb3b","repo":"nautechsystems/nautilus_trader","slug":"retained-execution-intent-has-an-unsupported-purpo","errorCode":null,"errorMessage":"Retained execution intent has an unsupported purpose","messagePattern":"Retained execution intent has an unsupported purpose","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":5342,"sourceCode":"            active_count <= 1,\n            \"Retained execution history has multiple active signer owners\"\n        );\n\n        let mut nonce_owners = HashMap::new();\n        let mut records = Vec::with_capacity(snapshot.intents.len());\n        let finalized_headers = finalized_headers\n            .iter()\n            .map(durable_verified_header)\n            .collect::<Vec<_>>();\n\n        for intent in &snapshot.intents {\n            anyhow::ensure!(\n                intent.chain_id == self.chain.chain_id\n                    && intent.wallet_address == self.config.wallet_address,\n                \"Retained execution intent belongs to another signer\"\n            );\n            let purpose = TransactionPurpose::parse(&intent.purpose).ok_or_else(|| {\n                anyhow::anyhow!(\"Retained execution intent has an unsupported purpose\")\n            })?;\n            let hashes = hashes_by_intent\n                .get(&intent.id)\n                .map(Vec::as_slice)\n                .unwrap_or_default();\n            let current = hashes\n                .iter()\n                .copied()\n                .filter(|hash| hash.current)\n                .collect::<Vec<_>>();\n            anyhow::ensure!(\n                current.len() <= 1,\n                \"Retained execution intent {} has multiple current hashes\",\n                intent.id\n            );\n            let current = current.first().copied();\n            let mut authenticated = HashMap::new();\n","sourceCodeStart":5324,"sourceCodeEnd":5360,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L5324-L5360","documentation":"Retained intents store their purpose as a string; during recovery the client parses it back into the TransactionPurpose enum. This error is thrown when the stored purpose string does not parse to a known variant, indicating the snapshot was written by an incompatible version or contains corrupt data.","triggerScenarios":"Loading a snapshot where intent.purpose is an unrecognized string (e.g. renamed enum variant, typo, or a purpose added by a newer version than the running client).","commonSituations":"Downgrading the client after a newer release introduced new TransactionPurpose variants; hand-editing snapshot files; corruption of the durable store.","solutions":["Upgrade the client to the version that wrote the snapshot so all purpose strings parse","Archive/migrate the snapshot: export, map old purpose strings to current variants, and rewrite the store","Reset the execution snapshot to force a clean rebuild if the intents are all finalized anyway"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"fn purposes_parseable(snapshot: &ExecutionSnapshot) -> Result<(), String> {\n    for i in &snapshot.intents {\n        if TransactionPurpose::parse(&i.purpose).is_none() {\n            return Err(format!(\"intent {} has unknown purpose '{}'\", i.id, i.purpose));\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match client.start_with_snapshot(snapshot) {\n    Err(e) if e.to_string().contains(\"unsupported purpose\") => { /* upgrade client or migrate/rewrite snapshot */ }\n    other => other?,\n}","preventionTips":["Keep client version aligned with the version that wrote the snapshot","Version-tag snapshots and run migrations on load","Never hand-edit snapshot files"],"tags":["state-corruption","enum-parsing","version-mismatch","recovery","durable-state"],"backgroundTag":"invalid-enum-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}