Summary
The pr-comment-responder agent does not properly handle Copilot's unique response pattern. When replying to @Copilot review comments, Copilot responds differently than human reviewers:
- Creates a separate follow-up PR branched from the current PR
- Posts an issue comment on the original PR (not a review comment reply)
- Links to the follow-up PR in that issue comment
This causes orphaned conversations and unnecessary follow-up PRs cluttering the repository.
Problem Observed
From PR #57:
Current Behavior
The pr-comment-responder agent:
- ✅ Retrieves review comments via
gh api repos/{owner}/{repo}/pulls/{pr}/comments
- ✅ Replies to comments via the replies endpoint
- ❌ Does NOT check issue comments for Copilot's follow-up responses
- ❌ Does NOT identify or close Copilot's generated follow-up PRs
Desired Behavior
- Detect Copilot Response: After replying to @Copilot, poll issue comments for Copilot's response
- Parse Response Intent: Determine if action is needed or if our explanation was accepted
- Manage Follow-up PRs: If a follow-up PR is created and no action is required, close it with explanation
- Report Results: Include "Copilot Interactions" table in the agent's output summary
User Stories
| ID |
Story |
Acceptance Summary |
| US-1 |
Detect Copilot response in issue comments |
Poll issue comments, filter by author/timestamp |
| US-2 |
Identify follow-up PRs |
Parse comment for PR links, validate PR exists |
| US-3 |
Close unnecessary follow-up PRs |
Evaluate reply intent, close with explanation |
| US-4 |
Report interaction results |
Add "Copilot Interactions" table to output |
Functional Requirements
- FR-1: Retrieve issue comments via
gh api repos/{owner}/{repo}/issues/{pr}/comments
- FR-2: Detect Copilot responses by author and timestamp
- FR-3: Extract follow-up PR numbers from Copilot's comment body
- FR-4: Close follow-up PRs with explanatory comment referencing original thread
- FR-5: Categorize replies (no action / acknowledged / needs discussion)
- FR-6: Implement polling strategy (60s timeout, 5s interval)
- FR-7: Ensure idempotency (do not close same PR twice)
Proposed Workflow Addition
Add Phase 4: Copilot Follow-up Handling after the current response phase:
[Is comment from @Copilot?] --No--> End
|
Yes
v
Poll for Copilot's issue comment response
|
v
[Response found?] --No (timeout)--> Log warning, End
|
Yes
v
Parse for follow-up PR reference
|
v
[Follow-up PR exists?] --No--> End (conversation complete)
|
Yes
v
[Our reply = "no action"?] --No--> Log: manual review needed
|
Yes
v
Close follow-up PR with explanation --> End
Open Questions
- Should we auto-merge valid follow-up PRs? (Recommend: No - too risky)
- What if Copilot creates multiple follow-up PRs?
- Can we programmatically resolve the original review thread?
- Should we skip closing PRs that already have reviews?
- What is Copilot's exact author identifier? (
copilot, github-copilot[bot], or github-actions[bot]?)
Related
🤖 Generated with Claude Code
Migrated from rjmurillo/vs-code-agents#65
Summary
The pr-comment-responder agent does not properly handle Copilot's unique response pattern. When replying to @Copilot review comments, Copilot responds differently than human reviewers:
This causes orphaned conversations and unnecessary follow-up PRs cluttering the repository.
Problem Observed
From PR #57:
Current Behavior
The pr-comment-responder agent:
gh api repos/{owner}/{repo}/pulls/{pr}/commentsDesired Behavior
User Stories
Functional Requirements
gh api repos/{owner}/{repo}/issues/{pr}/commentsProposed Workflow Addition
Add Phase 4: Copilot Follow-up Handling after the current response phase:
Open Questions
copilot,github-copilot[bot], orgithub-actions[bot]?)Related
.agents/planning/PRD-copilot-response-handling.md🤖 Generated with Claude Code
Migrated from rjmurillo/vs-code-agents#65