chief icon indicating copy to clipboard operation
chief copied to clipboard

Smarter iteration management: per-task retries and auto-continue

Open MiniCodeMonkey opened this issue 9 months ago • 0 comments

Context

Chief currently uses a global max iterations counter (NUMBER_OF_TASKS + 5) to limit the total number of agent loop cycles.

Problem

  1. Exhausting iterations stops Chief entirely — when max iterations is reached, Chief stops instead of flagging the stuck task for human review and moving on to other unblocked tasks
  2. Max iterations is the wrong abstraction — completing 10 tasks successfully is not the same as completing 1 task and failing 9 times. A user with 290 tasks hits the limit after ~10 tasks
  3. Existing bug: max iterations is calculated from the task count of the first PRD in the list, not the currently selected one

Suggested solution

  • Track retry count per task, not globally
  • When a task fails repeatedly (e.g. 3 times), mark it as needing human review and move on to other unblocked tasks
  • Consider whether failed tasks could be unblocked by completing other tasks or refactoring tasks first
  • Fix the bug where iteration count uses the wrong PRD's task count

MiniCodeMonkey avatar Feb 27 '26 21:02 MiniCodeMonkey