This paper discusses the challenges and opportunities presented by generative AI technologies for novice learners' self-regulation in programming problem-solving. The authors propose a new framework for self-regulated learning (SRL) that incorporates the use of generative AI tools. They argue that while these tools can provide accurate code, they may hinder students' ability to develop essential self-regulation strategies such as planning and reflection. The paper outlines a framework for SRL in programming problem-solving, which includes phases such as problem understanding, use of generative AI, and solution evaluation. It also emphasizes the importance of motivation and affect in the learning process. The authors suggest that educational interventions should focus on fostering self-regulation skills, such as problem understanding, solution evaluation, and externalized metacognition. The paper concludes by highlighting the need for principled approaches to integrate generative AI in computing education to support effective learning.This paper discusses the challenges and opportunities presented by generative AI technologies for novice learners' self-regulation in programming problem-solving. The authors propose a new framework for self-regulated learning (SRL) that incorporates the use of generative AI tools. They argue that while these tools can provide accurate code, they may hinder students' ability to develop essential self-regulation strategies such as planning and reflection. The paper outlines a framework for SRL in programming problem-solving, which includes phases such as problem understanding, use of generative AI, and solution evaluation. It also emphasizes the importance of motivation and affect in the learning process. The authors suggest that educational interventions should focus on fostering self-regulation skills, such as problem understanding, solution evaluation, and externalized metacognition. The paper concludes by highlighting the need for principled approaches to integrate generative AI in computing education to support effective learning.