Tech SkillsLimits and Safety

Stop A Stuck Loop Question Explained

This worked Loop Engineering practice question tests Limits and Safety. Try the answer first, then review why B is the best choice.

Short answer

The correct answer is B. Add a stop rule for repeated failure, then inspect the task before restarting.

Fourteen identical failures mean the task or the environment is wrong, and another try will fail the same way. Give the loop a no-progress rule, such as an attempt cap or a repeated-failure rule, that ends the loop and hands the problem to a person. Inside a /loop prompt, that rule is an instruction to Claude, not an enforced limit. For claude -p runs, Claude Code enforces the --max-turns and --max-budget-usd flags, though spend can pass the budget cap. Then read what failed and fix the task before you start again. The correct answer is B. Add a stop rule for repeated failure, then inspect the task before restarting

The Question

Your overnight loop tried the same task fourteen times. Each run edited the same line, the check failed the same way, and the run ended. What should you change before restarting?

AShorten the interval so the fix lands sooner
BAdd a stop rule for repeated failure, then inspect the task before restartingCorrect
CSwitch to a larger model so the fourteenth attempt succeeds
DRemove the check so the task can be marked done and the queue moves on to the next one

Why B is correct

Fourteen identical failures mean the task or the environment is wrong, and another try will fail the same way. Give the loop a no-progress rule, such as an attempt cap or a repeated-failure rule, that ends the loop and hands the problem to a person. Inside a /loop prompt, that rule is an instruction to Claude, not an enforced limit. For claude -p runs, Claude Code enforces the --max-turns and --max-budget-usd flags, though spend can pass the budget cap. Then read what failed and fix the task before you start again. The correct answer is B. Add a stop rule for repeated failure, then inspect the task before restarting

Why the other options are wrong

Option A: Shorten the interval so the fix lands sooner

A shorter interval repeats the same failure faster. Nothing about the task changes between runs.

Option C: Switch to a larger model so the fourteenth attempt succeeds

A larger model can solve some tasks a smaller one cannot. It does not fix a missing file, a wrong path, or a task that cannot be done, and it costs more per failed attempt.

Option D: Remove the check so the task can be marked done and the queue moves on to the next one

Removing the check hides the failure. The queue moves on and the broken change stays in the page.

Key idea: Limits and Safety

Loop engineering is a practice skill. Open Claude Code in a throwaway folder, write one small task in a file, and run it with /loop or /goal while you watch. If you doubt an answer, test it against a real run in that folder.

Ready to test the full skill?

Take the free Loop Engineering quiz and find the exact basics to review next. No signup required.

Practice related questions

Same skill area or adjacent concept. Use these after reviewing the explanation.

Related Loop Engineering Practice Questions