Skip to content

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

@MiniCodeMonkey

Description

@MiniCodeMonkey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: agentClaude agent loopenhancementNew feature or requestpriority: highBlocks users or degrades experiencesize: mediumA few files, clear scope

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions