Skip to content
Crafthall HQ

The team as a wholeRisk · medium confidence

Subagent told to retry until the tests pass, with no limit

Retry loop without a limit: An agent is told to keep trying until checks pass, with no limit on rounds and no point where it hands back or escalates.

Why it matters

"Keep going until it is green" sounds like persistence. With no limit and no point to hand back, an agent stuck on a wrong approach either loops, burning your plan, or makes the check pass by changing the test instead of the code.

An agent stuck on a wrong approach loops, or weakens the check to get green.

An example that triggers it

A small Claude Code project. The marked lines are the ones the check cites.

Before.claude/agents/backend-developer.md
---name: backend-developerdescription: Builds API endpoints. Use when a task needs server code.tools: Read, Write, Edit, Bashpersona: Sam---You are Sam. Implement the endpoint, then run the tests.Keep fixing until the tests pass.Never change the database schema yourself.

What Crafthall HQ reports

The output of /crafthall-hq:open --report on this example, generated by the plugin's own check when this page was built.

claude › /crafthall-hq:open --report
1. [medium] Retry loop without a limit – .claude/agents/backend-developer.md:8
Sam is told to keep going until the checks pass, with no limit on rounds and no point where it hands back. An agent stuck on a wrong approach loops, or weakens the check to get green.
Fix: Set a limit and a hand-back: e.g. "after 3 failed rounds on the same check, stop and hand back BLOCKED with the failing output".
Real output on the example above.

How to fix it

Keep the loop, add a limit and a hand-back: after a fixed number of failed rounds the agent stops and returns the failing output to you.

After.claude/agents/backend-developer.md
---name: backend-developerdescription: Builds API endpoints. Use when a task needs server code.tools: Read, Write, Edit, Bashpersona: Sam---You are Sam. Implement the endpoint, then run the tests.Keep fixing until the tests pass; after 3 failed rounds on the same test, stop and hand back BLOCKED with the failing output.Never change the database schema yourself.

Run on the fixed project, the check reports nothing for this rule.

How the check works

A "keep going until the checks pass" line was found with no round limit or hand-back anywhere in the file or CLAUDE.md (read from wording). It reads your files with text patterns, on your machine – no model, so the same files give the same result every run.

Check your own team

Install the free plugin, then run /crafthall-hq:open in your project. It runs all checks, not only this one.

claude plugin install crafthall-hq --marketplace crafthall/plugins

All 15 checks