In Genesis 15 & 16, Abram chooses to trust God and believe and God calls him righteous - because of his faith, not actions. God then walks Abram through the cutting of the covenant but only God passes through the pieces of dead animals showing it is a unilateral covenant that Abram cannot mess up. It's a promise God will bring forth regardless of any circumstances or mistakes along the way. God will make a way no matter what. In the very next chapter, Sarai gets impatient, intervenes, and makes a mess of things. God intervenes with compassion and grace, just as He does every single time through the messes we make along the way.