Skip to content

fix: when user remove ai-rework, loope read the source code in worktree and say: this is implemented (#49) - #52

Open
ngthluu wants to merge 1 commit into
mainfrom
ai/issue-49
Open

fix: when user remove ai-rework, loope read the source code in worktree and say: this is implemented (#49)#52
ngthluu wants to merge 1 commit into
mainfrom
ai/issue-49

Conversation

@ngthluu

@ngthluu ngthluu commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Closes #49

Automated by loope (bug flow). Spec and plan, if any, are committed in this branch under docs/.

…resh (#49)

When a human removes ai-rework, the issue re-enters the normal eligible
queue and handleIssue ran a brand-new Claude session against the preserved
worktree. That fresh session only sees the worktree's current contents, so
partial progress from the interrupted run reads as a finished feature: it
prints PIPELINE_ALREADY_DONE and the issue gets closed with no PR ever
opened.

handleIssue now detects a rework pickup itself, with no scanning or polling
of ai-rework: a park-cause file still on disk (see hasParkCause) means this
issue was parked and a human just removed the label, since that removal is
the only way it re-enters ListEligibleIssues from ai-rework. On that path it
resumes the session recorded by the interrupted run (RunResumePipeline,
--resume) with a "continue, don't restart" prompt, and never treats an
already-done claim as one — that check exists to let a FRESH session bail out
of duplicate work, and applied to a session mid-implementation it's the exact
bug being fixed here. The resumed pipeline is deliberately a single turn +
ship, mirroring the old (deleted) Rework() design, rather than re-entering
the multi-stage feature state machine partway through.

This intentionally reverses one assertion from bd8e374 (which removed an
automatic, unwatched, every-cycle rework scanner after it burned tokens on
parked issues nobody was watching): a rework pickup now does call
`claude --resume`. It does not reintroduce what actually caused that
incident — nothing scans or retries ai-rework on its own; this only fires
once, on the pickup that follows a human's own label removal, same as any
other requeue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: when user remove ai-rework, loope read the source code in worktree and say: this is implemented

1 participant