Skip to content

Infinite code review loop: quality reviewer anchors on prior critique in subagent-driven-development #259

@Joi

Description

@Joi

Summary

The quality-fix step in the Superpowers subagent-driven-development recipe gets stuck in an infinite review loop. The quality reviewer appears to anchor on its own prior critique when re-reviewing revised code, finding derivative/related issues instead of assessing whether the original problems were resolved.

Note: my understanding is that the Amplifier and Superpowers teams have previously tried to address this class of bug, but the fix (whatever it was) is not holding in the current state.

Repro

Session 79067ec6-7fc6-4456-8339-98868bf3ef3e exhibited this loop twice in a single session (Phase 1 and Phase 2 of a feature implementation), each requiring manual user cancellation to break out.

Observed pattern

Task → Spec Review → Implementation → Quality Review v1 → Legitimate issue found
                                                              ↓
                                                        Fix applied (commit 58c9d92)
                                                        Tests still pass ✅
                                                              ↓
                                               Quality Review v2 → Derivative issue found
                                                        (anchored on v1 critique,
                                                         found related issue on
                                                         same code path)
                                                              ↓
                                                        Fix applied (commit a6bed35)
                                                        Tests still pass ✅
                                                              ↓
                                               Quality Review v3 → CANCELLED BY USER

Both "fixes" in the loop touched the same subsystem (test-suite scoping), strongly suggesting the reviewer was re-reading its earlier notes rather than freshly evaluating the revised code. Tests remained green throughout — the work was functionally done but the reviewer kept finding new angles of critique.

Expected behavior

Per the documented pattern, re-review after failure should spawn a fresh reviewer (context_depth="none") with no memory of the prior review. The recipe appears to either:

  1. Not pass context_depth="none" to the quality reviewer re-run, OR
  2. Pass it but the reviewer still inherits context through some other path (accumulated conversation, agent result scope, etc.)

Suggested investigation

  1. Inspect subagent-driven-development.yaml and confirm the quality-fix step (or whatever drives the re-review) uses context_depth: "none" and context_scope: "conversation" on re-runs
  2. Verify no upstream step is accumulating review results into a shared context that the fresh reviewer then picks up
  3. Consider adding a convergence cap: if 2+ consecutive quality reviews find issues on the same code sections, auto-approve or escalate to the user rather than continuing the loop
  4. Consider a stronger signal: if tests are still passing and the new issues are derivative (same files, related concerns), treat as convergence rather than new failure

Evidence

A redacted session log excerpt is available on request — it documents the full timeline, the two successive fixes, and the cancellation points. It has been scrubbed of personal paths, secrets, and private content. Happy to share via email/DM.

Context

Running Amplifier with the superpowers bundle composed. The loop happened on a routine static-site feature (sitemap + metadata files), so this is not a complex-domain edge case — it is happening on straightforward work where tests are green and the reviewer just keeps finding new angles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions