Skip to content

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

Open
ivanvpetrov wants to merge 7 commits into
masterfrom
ipetrov/agents-revisit-step-logic
Open

feat(agents): Add backtracking and feedback loop to bug-fixing agent workflow#17059
ivanvpetrov wants to merge 7 commits into
masterfrom
ipetrov/agents-revisit-step-logic

Conversation

@ivanvpetrov
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread .github/agents/changelog-agent.md Outdated
@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
Base automatically changed from ganastasov/add-agents to master March 23, 2026 11:31
@github-actions
Copy link
Copy Markdown

There has been no recent activity and this PR has been marked inactive.

@github-actions github-actions Bot added the status: inactive Used to stale issues and pull requests label May 23, 2026
@kdinev kdinev removed the status: inactive Used to stale issues and pull requests label May 26, 2026
@kdinev
Copy link
Copy Markdown
Member

kdinev commented May 26, 2026

@ivanvpetrov What is the status of this PR?

@ivanvpetrov ivanvpetrov added ci: codeql and removed 🛠️ status: in-development Issues and PRs with active development on them labels May 28, 2026
@kdinev kdinev removed the ci: codeql label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants