max_trials names two different budgets in DyLAN
tech-debt · found during Phase 2
Within twenty lines of tasks/mas_workflow/dylan/dylan.py:
max_trials: int = task_config.get('max_trials', 3) # :170 per-agent-call retries
...
for i in range(env.max_trials): # :204 episode budget
...
while tries < max_trials: # :219 the retry one again
env.max_trials is how many trials the episode gets. The local max_trials is how many times a single agent call may be retried.
The local one is also read from task_config, where run.py never puts it — max_trials is an experiment config key, consumed by build_task as max_steps and handed to the environment. So the local lookup always falls through to the literal 3.
Severity: confusion, not a live defect. --max_trials does reach the episode budget by the intended route, and the retry budget genuinely is meant to be 3. Worth fixing because the next person to read this cannot tell that from the code.
Fix: rename the retry budget — max_retries, or drop the local entirely — when the DyLAN loop is folded into MetaMAS._call_agent_with_retries, which already takes the budget as a named max_tries parameter. Land with the DyLAN/MacNet retry-loop issue (see the separate issue).
Migrated from docs/BACKLOG.md.
max_trialsnames two different budgets in DyLANtech-debt· found during Phase 2Within twenty lines of
tasks/mas_workflow/dylan/dylan.py:env.max_trialsis how many trials the episode gets. The localmax_trialsis how many times a single agent call may be retried.The local one is also read from
task_config, whererun.pynever puts it —max_trialsis an experiment config key, consumed bybuild_taskasmax_stepsand handed to the environment. So the local lookup always falls through to the literal3.Severity: confusion, not a live defect.
--max_trialsdoes reach the episode budget by the intended route, and the retry budget genuinely is meant to be 3. Worth fixing because the next person to read this cannot tell that from the code.Fix: rename the retry budget —
max_retries, or drop the local entirely — when the DyLAN loop is folded intoMetaMAS._call_agent_with_retries, which already takes the budget as a namedmax_triesparameter. Land with the DyLAN/MacNet retry-loop issue (see the separate issue).Migrated from
docs/BACKLOG.md.