Skip to content

[feature-runner] Protect /loop from re-picking a failed Feature (flip status to needs-info) #97

@orioltf

Description

@orioltf

This was generated by AI during triage.

Parent

docs/issues/feature-runner/PRD.md

What to build

When /tdd fails on an issue, the Feature Runner appends a failure note and stops — but leaves the failing issue at ready-for-agent. Under /loop /implement-feature, auto-select then re-picks the same Feature on the next iteration (because it still has a ready-for-agent issue) and retries the same failing issue, burning loop iterations indefinitely.

The fix: on /tdd failure, flip the failing issue's **Status:** line from ready-for-agent to needs-info. needs-info is an existing triage label ("waiting on reporter for more information") and is already in the auto-select disqualification list at step 0 — no vocabulary expansion is required.

Changes

1. SKILL.md step 4 "On failure"

After appending the failure note, add a second edit:

Using the Edit tool, change the **Status:** ready-for-agent line to **Status:** needs-info. This prevents auto-select from picking up this Feature on subsequent loop iterations.

2. references/runner-output-formats.md — failure note

Update the failure note to mention the status flip and the recovery procedure:

## Comments

> _This was generated by AI during triage._

**Feature Runner failure**`/tdd` could not complete this issue. Status has been set to `needs-info`.

The worktree at `.claude/worktrees/<slug>` has been left in place for inspection. Once the issue is resolved manually, restore `**Status:** ready-for-agent` and re-run `/implement-feature <slug>` to resume. Alternatively, close or reject the issue if it should not be retried.

3. docs/agents/feature-runner.md — "Failure behaviour" section

Update step 2 of the numbered list:

Replace:

The issue remains at Status: ready-for-agent.

With:

The issue status is changed to needs-info. This prevents the auto-selection path from picking up this Feature on subsequent /loop iterations until the developer investigates and restores ready-for-agent (or closes/rejects the issue).

4. SKILL.md Quick start — "Safe to interrupt" bullet

Distinguish Ctrl+C from /tdd failure explicitly. Update the bullet:

Safe to interrupt — Ctrl+C during any issue leaves that issue at ready-for-agent; re-running resumes from the first unresolved issue. Note: a /tdd failure (as opposed to a Ctrl+C interrupt) sets the failing issue to needs-info, preventing auto-select from retrying until the developer intervenes.

Rationale

The overnight-loop use case is the primary composition for the Feature Runner. An auto-select that retries the same broken Feature undermines the purpose of /loop. needs-info already signals "blocked on a human" in the triage vocabulary — exactly the right state for a Feature Runner failure.

Acceptance criteria

  • On /tdd failure, the failing issue's **Status:** is changed to needs-info (not left at ready-for-agent)
  • Subsequent auto-select runs skip the Feature (because needs-info already disqualifies a Feature in step 0)
  • The failure note in references/runner-output-formats.md documents the needs-info flip and the recovery procedure (restore ready-for-agent and re-run, or close/reject)
  • docs/agents/feature-runner.md "Failure behaviour" section reflects the status flip to needs-info
  • SKILL.md Quick start distinguishes Ctrl+C (leaves ready-for-agent) from /tdd failure (sets needs-info)
  • Manual interrupt (Ctrl+C) behaviour is unchanged: issue stays ready-for-agent

Blocked by

None — can start immediately.


PRD: docs/issues/feature-runner/PRD.md
Migrated from: docs/issues/feature-runner/18-failure-loop-protection.md (source removed after migration)
Touched by PRs: #25, #32

Metadata

Metadata

Assignees

No one assigned

    Labels

    closedPR has been mergedenhancementNew feature or requestfeature/feature-runnerIssues from the feature-runner feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions