Menu

#18 Test infinite loop safeguards: max_turns budget and doer-reviewer cycle limits

closed
nobody
None
2026-03-28
2026-03-24
Anonymous
No

Originally created by: kumaakh

Problem

Infinite loops are a core concern in the PM skill. Safeguards exist but need mock tests to verify they work:

Current Safeguards

  1. execute_prompt max_turns budget — each dispatch has a turn limit. If the agent can't complete, it throws an error. PM is instructed not to resume that conversation (assuming the agent committed progress).
  2. PM retry limit — PM never retries the same dispatch more than 3 times.
  3. Doer-reviewer cycle limit — if 3 cycles of doer-reviewer loop don't resolve all HIGH items, the sprint pauses for human intervention.

What Needs Testing

These safeguards are defined in PM skill instructions but are not verified with automated tests. A compromised or buggy member could cause unbounded token spend.

Acceptance Criteria

  • [ ] Mock test: execute_prompt hits max_turns → PM does NOT resume, escalates correctly
  • [ ] Mock test: 3 failed retries → PM stops and flags to user
  • [ ] Mock test: 3 doer-reviewer cycles with unresolved HIGHs → sprint pauses
  • [ ] Mock test: zero progress after 2 session resets → model escalation happens (haiku→sonnet→opus)
  • [ ] Mock test: zero progress after model escalation → flagged to user
  • [ ] Document the safeguard chain in PM skill docs

Related

Tickets: #77

Discussion

  • Anonymous

    Anonymous - 2026-03-28

    Originally posted by: kumaakh

    Fixed in PR [#30]

     

    Related

    Tickets: #30

  • Anonymous

    Anonymous - 2026-03-28

    Ticket changed by: kumaakh

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB