LoopFlow
Tutorial Workshop Keywords ๐ŸŽฎ LoopFlow Lab
Keywords / after N tries (thrash guard)

after N tries (thrash guard)

Stop & warn if it gets stuck. Control & transitions

Syntax

after N tries: stop and warn "<message>"

What it does

The thrash guard. Because attempts outranks fail, it always wins once the threshold is crossed โ€” so a self-correcting loop warns and stops instead of grinding to the absolute hard cap of 25. Put one on every loop that reflects.

Example

after 6 tries: stop and warn "thrashing โ€” needs a human look"
the thrash guard

How it runs

AFTER EACH OBSERVE โ€” FIRST MATCH WINS 1blocked? ask a human 2after N tries? stop & warn โš  3passes & goal met? stop โœ“ done 4it fails? reflect, then plan again
The order is the engine's, not yours: attempts is checked before fail, so the thrash guard always wins once you hit the limit.

Related