{"record":{"id":"34bf1573da41118d","repo":"nautechsystems/nautilus_trader","slug":"execution-intent-nonce-retains-signer","errorCode":null,"errorMessage":"Execution intent {} ({}, nonce {}) retains signer ownership pending recovery; at most one transaction can be in flight","messagePattern":"Execution intent (.+?) \\((.+?), nonce (.+?)\\) retains signer ownership pending recovery; at most one transaction can be in flight","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":1855,"sourceCode":"enum TransactionAuthorization {\n    Wrap {\n        weth: Address,\n    },\n    Approve {\n        token: Address,\n        router: Address,\n        amount: U256,\n    },\n}\n\n/// The single-in-flight limit error naming the transaction currently occupying the slot.\nfn in_flight_limit_error(slot: &InFlightSlot) -> anyhow::Error {\n    match slot {\n        InFlightSlot::Preparing(purpose) => anyhow::anyhow!(\n            \"A {} transaction is being prepared; at most one transaction can be in flight\",\n            purpose.as_str()\n        ),\n        InFlightSlot::Recovering(recovery) => anyhow::anyhow!(\n            \"Execution intent {} ({}, nonce {}) retains signer ownership pending recovery; at most one transaction can be in flight\",\n            recovery.intent_id,\n            recovery.purpose.as_str(),\n            recovery.nonce\n        ),\n        InFlightSlot::AwaitingFinality(in_flight) => anyhow::anyhow!(\n            \"Transaction {} (intent {}, {}, nonce {}) is still awaiting finality; at most one transaction can be in flight\",\n            in_flight.tx_hash,\n            in_flight.intent_id,\n            in_flight.purpose.as_str(),\n            in_flight.nonce\n        ),\n    }\n}\n\n/// Releases a pre-signature slot claim when the slot is still in the preparing state.\n///\n/// Aborted or failed preparation can leave a claim behind; because no signed transaction","sourceCodeStart":1837,"sourceCodeEnd":1873,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L1837-L1873","documentation":"Raised when the single in-flight slot is occupied by an execution intent that failed or was interrupted and still retains signer ownership pending recovery (its nonce is outstanding). New transactions are blocked until the intent is recovered or finalized.","triggerScenarios":"Submitting a new transaction after a previous execution intent errored post-signing or post-submission, leaving its nonce/signer ownership in the 'Recovering' state in the InFlightSlot.","commonSituations":"A prior transaction's broadcast failed or its receipt was lost (RPC outage) leaving the intent pending recovery; strategy restarted mid-flight and the slot still references the old intent.","solutions":["Run the recovery flow for the named intent (recover by intent_id/nonce) to release signer ownership.","Check the outstanding nonce's on-chain status; if the tx landed, finalize it to clear the slot.","If the transaction definitively failed, cancel/replace it with the same nonce to reclaim ownership.","Ensure the client's state is restored from durable storage on restart so intents aren't orphaned."],"exampleFix":"// before: blocked by recovering intent\nclient.submit_order(new_order)?; // intent 0xabc... pending recovery\n// after: recover first\nclient.recover_intent(\"0xabc...\").await?;\nclient.submit_order(new_order)?;","handlingStrategy":"try-catch","validationCode":"if let Some(slot) = client.in_flight_slot() { if slot.is_recovering() { client.recover_intent(slot.intent_id()).await?; } }","typeGuard":"fn is_recovering(slot: &InFlightSlot) -> bool { matches!(slot, InFlightSlot::Recovering(_)) }","tryCatchPattern":"match client.submit_order(order) { Err(e) if e.to_string().contains(\"pending recovery\") => { let id = parse_intent_id(&e); client.recover_intent(id).await?; retry(order); } Ok(r) => r }","preventionTips":["Always run the recovery flow after interrupted submissions","Persist intent state durably so restarts can recover","Reconcile nonces with chain state on startup"],"tags":["transaction","nonce","recovery","state-machine"],"backgroundTag":"invalid-state-transition","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"}