Self-efficacy and action outcomes form a positive feedback loop: having high self-efficacy leads to higher expectations, leads to more challenging problems, and the successful overcoming of the problem leads to higher self-efficacy.
The “successful overcoming”-part seems like what determines whether the feedback loop is positive or negative.