I have a craftsman 18" ratchet that they no longer make and do not offer repair kits for any longer. In fact to my knowledge they no longer make anything like it and I was offered a smaller one when I asked about the warranty. I love this ratchet enough I have acquired 2 of them but I use them almost daily so I wanted to repair this one.
I took it apart and found the reason it was not holding was the spring under the ball that hold the ratcheting mechanism in place was broken. Also, the ball had a flat spot worn on it that could also cause it to slip. I am sorry I did not think of taking pictures when I started this project, so I will just use the same pictures of me putting it back together to show the procedure for taking it apart. Please note it was much dirtier when I started. I cleaned the ratchet and inside parts with an ultrasonic cleaner(carb cleaner would have worked almost as well though).
Step 1: Start the Teardown
Take the ratchet apart.
Use a pair of needle nose pliers to remove the retaining clips and slowly pull the back of the ratchet apart. Be careful not to loose the ball. You will find a spring in the hole located in the handle of the ratchet.
What you see in the picture is a ball from a ball bearing that happened to be the same size. As to replacing the spring I just got lucky and found one in my spring drawer. Hopefully yours is not worn out or you can find one the same size.