Pull request fix suggestions
Trigger the SonarQube Remediation Agent to fix issues in a pull request when your quality gate fails, and review the pull request it opens. This page is for SonarQube Server 2026.5.
The SonarQube Remediation Agent proposes fixes for the issues found during a pull request analysis. When your quality gate fails, you can trigger the agent from SonarQube Server. It generates the changes in the background and opens a pull request targeting your branch, for you to review and approve.
The Remediation Agent is available in the Enterprise and Data Center editions and requires a separate subscription.
Pull request remediation is available for projects bound to GitHub, GitLab, or Azure DevOps.
Prerequisites
Your project is bound to a GitHub, GitLab, or Azure DevOps repository, and the agent has write access to it. See Binding to GitHub, Binding to GitLab, or Binding to Azure DevOps.
An LLM provider and a model are configured for the instance.
Manual backlog remediation is turned on for the instance. See Enabling the agent.
Triggering the agent
You can trigger the agent only from SonarQube Server, not from your DevOps platform. When your quality gate fails during a pull request analysis, a button to trigger the agent appears in two places:
On the pull request's summary page.
On the pull request's issues list.
Select Assign to agent to trigger it.
Tracking the agent's job
To follow what the agent is doing, go to your project and open the Remediation Agent page. It lists each job with:
Status / Duration
The job's current state: Pending, In progress, Completed, or Failed. Completed and failed jobs also show how long the job took. An in-progress job shows Please wait... instead.
Started
When the job started. Recent jobs show Today or Yesterday.
Source
What triggered the job. Pull request remediation jobs show Pull request remediation.
Outcome
A link to the pull request the agent opened, shown as PR #<number>. Pending and in-progress jobs show a dash, as do completed jobs that did not produce a pull request. A failed job shows Failed with a tooltip giving the reason.
The page shows the number of jobs currently listed. Select Show more to load older jobs.
Reviewing the agent's pull request
The agent opens a new pull request targeting your original pull request's branch, with a link back to the original pull request. Review it the way you review any other pull request in your team's workflow, then merge it to apply the fixes.
Reviewer assignment
The agent automatically assigns a reviewer to the pull request it opens, using each DevOps platform's native reviewer concept: GitHub reviewers, GitLab approvers, or Azure DevOps required reviewers.
To choose a reviewer, the agent looks for someone who recently worked on the changed files. If a file has no history, it falls back to whoever committed recently elsewhere in the repository.
Reviewer assignment does not block the pull request: if the agent cannot confirm an eligible reviewer, it still opens the pull request without one.
On forked repositories, the agent's candidates can include the upstream project's authors, who are not collaborators on your fork. In that case, reviewer assignment can fail and the pull request opens without a reviewer.
On GitLab, reviewer assignment requires GitLab 16.3 or later. See Reviewer assignment support.
Related pages
Last updated
Was this helpful?

