Chance NOT the Direct Cause of Human Action
Chance cannot directly cause our actions. We cannot be responsible for random actions.
Because of quantum mechanics, we now know that indeterminism is true and absolute chance exists in the universe.
Chance can generate random and totally unpredictable alternative possibilities for action, our "Agenda" for the Cogito.
These alternatives are generated from our internal knowledge of practical possibilities. Those that are handed up for consideration may be filtered to some extent by unconscious processes to be "within reason." They may consist of slight variations of past actions we have willed many times in the past.
The selection of one of these possibilities by the will is as deterministic and causal a process as anything that a determinist or compatibilist could ask for, consistent with our knowledge of the physical world.
Instead of a strict causal determinism, the world offers only adequate determinism.
Consequently, at the very most, the indeterminism or chance involved in the generation af alternative possibilities is just an indirect cause of action, and just one of many causes.
One of these possibilities is de-liberated by our causally determined will, so we can say that the action was up to us and that we can accept moral responsibility for it.
Some unjustified fears about chance
Through the years, a number of sensible philosophers have panicked at the thought of truly chance events, the dreaded "causa sui."
The Stoic Chrysippus, warned in the third century B.C.E.
"Everything that happens is followed by something else which depends on it by causal necessity. Likewise, everything that happens is preceded by something with which it is causally connected. For nothing exists or has come into being in the cosmos without a cause. The universe will be disrupted and disintegrate into pieces and cease to be a unity functioning as a single system, if any uncaused movement is introduced into it."
Here is P. H. Nowell-Smith's concern about randomness (Mind, volume 225, January, 1948)

The fallacy of [Incompatibilism] has often been exposed and the clearest proof that it is mistaken or at least muddled lies in showing that I could not be free to choose what I do unless determinism is correct. For the simplest actions could not be performed in an indeterministic universe. If I decide, say, to eat a piece of fish, I cannot do so if the fish is liable to turn into a stone or to disintegrate in mid-air or to behave in any other utterly unpredictable manner.
J. J. C. Smart is an extreme case of those who believe quantum indeterminism might be a direct cause of action. He is reported to have said:

"Indeterminism does not confer freedom on us: I would feel that my freedom was impaired if I thought that a quantum mechanical trigger in my brain might cause me to leap into the garden and eat a slug."
For Teachers
Stanford Encyclopedia of Philosophy
For Scholars

Chapter 3.7 - The Ergod Chapter 4.2 - The History of Free Will
Part Three - Value Part Five - Problems