Skip to main content

MAX_REDELEGATIONS

Constant MAX_REDELEGATIONS 

Source
pub const MAX_REDELEGATIONS: u32 = 3;
Expand description

Maximum total engineer delegation attempts for a single execute_run_task run, shared across every delegate_to_agent call the PM makes (#2265).

Why: This — not the PM’s own turn budget — is the ceiling on retry count going forward. 3 total attempts (1 initial + up to 2 reuse-aware retries) is deliberately modest: each retry now costs up to 40 engineer turns (#2233’s raised default), so an unbounded or generous cap here would reintroduce the same runaway-cost failure mode this fix closes. What: Checked BEFORE every engineer invocation in [RedelegatingRunner::run_with_retries]; once the shared attempt count exceeds this value, no further engineer invocation happens at all. Test: redelegating_runner_stops_at_cap_and_marks_signal.