There are many ways of understanding the codependence and also many ways of living it. Basically, it requires the approval of the other to live. What complicates things more is that they seek the approval of another who usually has serious problems: alcoholism, drug addiction, severe neurosis, bipolarity, depression, personality disorders, various pathologies.
This makes dependency greater and much more painful because that other one from which we depend emotionally it does not have the structure or the health to give more or less stable answers. He gets angry with you for his own problems (and not for what you do or stop doing), he rejoices with you for his own situations (maybe because he is under the influence of alcohol) and not because you have done it "well" .
You may also be interested: Responsibility is reflected in your body
What I want to say is that your response does not depend on your behavior. Your answer depends on your way of being at that moment. Like who says: there is no way to please them.
This type of relationship becomes severely ill. You go little by little undermining your self esteem , you live all the time with anguish. You do not know what to do anymore. You betray yourself by denying yourself the possibility of acting freely and of maintaining your dignity as long as that other loves you, is healed, is better.
Do I say something very strong ?: that other one is not going to heal. It's not going to change. Or at least, it will not change through your actions. You must take care of yourself. Nobody can do it for you. It is very difficult, I know it. But you must remember that you have only one life and that life is very beautiful, and must be lived out of respect for oneself. First of all, if you're acting code-dependent, I assure you: you're avoiding the responsibility to take charge of your own life.