How to Make Cursor Agent Run More Smoothly When Modifying Code?

When I use Cursor’s agent for coding, after it helps me modify the code, it sometimes tries to compile or execute the code before I accept the changes. This causes the process to fail and get stuck. How can I avoid this situation and make the agent run more smoothly?

Hey, which programming language are you using?

python