Context (AMS adversarial audit)
claim-conflict-resolver.ts:44-47 documents that a retry-after-crash's stale own PR is never treated as a competing claim; submission-freshness-check.ts:145-149 excludes same-author PRs from staleness; governor-state.ts's own-submission table carries issueNumber (attempt-cli.ts:874-880) but nothing queries it before a new attempt. Kill the process after PR-open but before the finally completes, retry the issue → second PR, no cleanup.
Fix
Before prepareOpenPrSubmission (ideally before a worktree slot is consumed), query listRecentOwnSubmissions({repoFullName}) filtered by issueNumber for a still-open pullRequestNumber; refuse or adopt the existing PR. Also align/document the 6h worktree-lease vs 14d claim-age reclaim windows while in the file. Tests both ways.
99%+ patch coverage, branch-counted.
Context (AMS adversarial audit)
claim-conflict-resolver.ts:44-47 documents that a retry-after-crash's stale own PR is never treated as a competing claim; submission-freshness-check.ts:145-149 excludes same-author PRs from staleness; governor-state.ts's own-submission table carries issueNumber (attempt-cli.ts:874-880) but nothing queries it before a new attempt. Kill the process after PR-open but before the finally completes, retry the issue → second PR, no cleanup.
Fix
Before prepareOpenPrSubmission (ideally before a worktree slot is consumed), query listRecentOwnSubmissions({repoFullName}) filtered by issueNumber for a still-open pullRequestNumber; refuse or adopt the existing PR. Also align/document the 6h worktree-lease vs 14d claim-age reclaim windows while in the file. Tests both ways.
99%+ patch coverage, branch-counted.