Feedback loops and retry limits

Why a run goes back; the revise loop, check repair hops, the intake repair, the hop cap, attempt retries and tool retries, each with a default, where it is set and what happens at the limit.

A run goes back for six reasons, each with its own counter. This page gives every number, where it is set and what happens when it runs out. File:line citations are in parentheses; "not checked" means the code was not read for that fact. Numbers marked with a fact marker are pinned by tests, so a changed default fails a test until this page changes.

01review send-backs and the revise loop#

When review does not accept, the baton goes to the revise_route router. It routes on needs_human: true goes to the gate, false goes back to work. max_false with exhausted_outlet: human limits the false route (internal/harness/ticket-completion.yaml:371-377, cords 490-493).

preset max_revise_loops
quick 1
balanced 2
thorough 2
max 3
lean 2
heavy 2

02check repair hops#

When the checks fail, check_router sends the baton back to work for a repair, up to repair_bound times, then to its failed_outlet.

03intake capability-assert repair#

The intake_proof node (capability_assert) checks that intake made the calls it must. If the only call missing is its repair_tool (rate_search_result in the shipped template), it sends the source node back once, with repair_field set to an instruction (ticket-completion.yaml:53-76).

04the hop cap#

A loop that never converges is ended by the run's hop cap. See the hop cap for the journal side.

05attempt retries#

A model node runs as one or more attempts under an AttemptPolicy. Retrying is opt-in. An omitted policy resolves to one attempt and no hidden recovery.

field default source
restart never
max_attempts 1
backoff.initial 1s , 104-106
backoff.maximum 30s , 107-109
backoff.multiplier 2 , 110-112
rate_limit_wait 6h

06tool retries#

A declared tool (harness.json tools[].retries) retries 0 times when unset. A negative value is refused at load.

07where to read them#

run_query sendbacks lists each send-back of a run, a rejected gate or a node's revise outlet, with its round and why (; it keeps the last 8 at). run_summary counts retries, repair hops and send-backs (runs). Gate behaviour is on gates.

08when you're the conductor#