feat(agents): Add backtracking and feedback loop to bug-fixing agent workflow#17059
Open
ivanvpetrov wants to merge 5 commits intoganastasov/add-agentsfrom
Open
feat(agents): Add backtracking and feedback loop to bug-fixing agent workflow#17059ivanvpetrov wants to merge 5 commits intoganastasov/add-agentsfrom
ivanvpetrov wants to merge 5 commits intoganastasov/add-agentsfrom
Conversation
(cherry picked from commit dc6a3e5)
Contributor
There was a problem hiding this comment.
Pull request overview
Adds explicit “surface problems + re-invocation” guidance across specialist agents and introduces a backtracking loop in the bug-fixing orchestrator so the workflow can recover when an agent flags earlier-step issues.
Changes:
- Introduces backtracking rules in
bug-fixing-orchestrator-agentto turn the workflow into a corrective loop instead of a strict pipeline. - Adds “Surfacing Problems” / “Re-invocation” (and related guardrails) to migration, changelog, and README agents.
- Adds guidance for handling incorrect reproduction tests between the test writer and implementer agents.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .github/agents/tdd-test-writer-agent.md | Adds guidance for re-invocation when a prior reproduction test is incorrect. |
| .github/agents/migration-agent.md | Adds explicit “surfacing problems” and “re-invocation” steps; renumbers subsequent steps. |
| .github/agents/component-readme-agent.md | Adds stop-and-surface guidance when handoff/code are inconsistent, plus re-invocation instructions. |
| .github/agents/changelog-agent.md | Adds stop-and-surface guidance and re-invocation instructions for CHANGELOG updates. |
| .github/agents/bug-fixing-orchestrator-agent.md | Adds a Step 3a backtracking table and updates completeness checks to account for backtrack signals. |
| .github/agents/bug-fixing-implementer-agent.md | Adds explicit rules for what to do when the reproduction test is wrong or root cause differs. |
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The bug-fixing orchestrator previously ran as a strict linear pipeline with no mechanism to recover from problems discovered mid-workflow. This PR adds an explicit backtracking loop so the process can self-correct when an agent surfaces an issue with earlier work.