diff --git a/step/run.go b/step/run.go index 53a28681..ac18a8a5 100644 --- a/step/run.go +++ b/step/run.go @@ -38,14 +38,15 @@ func Run[T any]( ) (T, error) { targetID := getTargetStepID(ctx) mgr := preflight(ctx, enums.OpcodeStepRun) - op := mgr.NewOp(enums.OpcodeStepRun, id) - hashedID := op.MustHash() if mgr == nil { // If there's no manager, execute the function directly. return f(ctx) } + op := mgr.NewOp(enums.OpcodeStepRun, id) + hashedID := op.MustHash() + if val, ok := mgr.Step(ctx, op); ok { return loadExistingStep(id, mgr, val, f) }