Skip to content

feat(agents): Add backtracking and feedback loop to bug-fixing agent workflow#17059

Open
ivanvpetrov wants to merge 5 commits intoganastasov/add-agentsfrom
ipetrov/agents-revisit-step-logic
Open

feat(agents): Add backtracking and feedback loop to bug-fixing agent workflow#17059
ivanvpetrov wants to merge 5 commits intoganastasov/add-agentsfrom
ipetrov/agents-revisit-step-logic

Conversation

@ivanvpetrov
Copy link
Contributor

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.

(cherry picked from commit dc6a3e5)
@ivanvpetrov ivanvpetrov changed the base branch from master to ganastasov/add-agents March 18, 2026 08:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-agent to 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.

@ivanvpetrov ivanvpetrov added 🛠️ status: in-development Issues and PRs with active development on them and removed 🆕 status: new labels Mar 18, 2026
@ivanvpetrov ivanvpetrov requested a review from kdinev March 18, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-agents ai-skills 🛠️ status: in-development Issues and PRs with active development on them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants