Parent PRD
#76
What to build
Ensure groups handle failures gracefully and can recover from crashes mid-group.
Failure handling (orchestrator):
- If the implement phase fails for a sub-issue (timeout, agent error, etc.), retry using existing timeout/retry logic (
agent_timeout_retries).
- Retries apply to the individual sub-issue, NOT the entire group. Other completed sub-issues are preserved.
- If all retries are exhausted, leave the group in its current state for manual intervention. The group state persists with
completed_sub_issues intact, and the failed sub-issue remains the current_task.
- On the next rlph iteration: the in-progress group is detected and the failed sub-issue is retried again (or the user can manually intervene by removing the state).
Crash recovery (orchestrator + state):
- On startup, if
StateManager has a current_group with incomplete sub-issues:
- Load the group state (parent ID, completed sub-issues, worktree path, branch).
- Verify the worktree still exists. If not, recreate it by checking out the existing branch.
- Determine the next eligible sub-issue (first uncompleted one whose dependencies are satisfied).
- Resume from that sub-issue.
- The worktree and branch are the source of truth for completed work. Group state tracks which sub-issues are done.
Edge cases:
- Crash after agent commits but before state is updated: on recovery, detect the commit in the worktree (by checking
git log for the sub-issue reference) and update state accordingly.
- Crash after PR submission but before review: resume directly into the review pipeline.
Acceptance criteria
Blocked by
User stories addressed
- User story 19: Group state survives crashes and allows resumption
- User story 20: Failed sub-issues retried before manual intervention
Parent PRD
#76
What to build
Ensure groups handle failures gracefully and can recover from crashes mid-group.
Failure handling (orchestrator):
agent_timeout_retries).completed_sub_issuesintact, and the failed sub-issue remains thecurrent_task.Crash recovery (orchestrator + state):
StateManagerhas acurrent_groupwith incomplete sub-issues:Edge cases:
git logfor the sub-issue reference) and update state accordingly.Acceptance criteria
cargo clippypasses with zero warningsBlocked by
User stories addressed