---
name: recover-execution
description: Recover a lost BREP script response or reconcile failed and cancelled CAD work without duplicating changes.
metadata:
version: "2.0.0"
---
If `run({code, key})` returned no response, call it again with exactly the same code and key. If an executionId is known, call `run({executionId})` to wait for or fetch its result again. Inspect state, error, operations and pendingOperationIds. `run({executionId, halt: true})` stops the program's worker but accepted CAD operations continue; cancel those explicitly with `sdk.operations.cancel` in a new program when the requested outcome requires it.
An epoch mismatch or expired/unknown handle is not proof that nothing happened. Inspect the document and saved artifacts before deciding whether another execution is appropriate. Do not infer rollback from failure, and do not automatically retry an external write with a new key.