> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/user-guide/issues/with-ai-features/pull-request-fix-suggestions.md).

# Pull request fix suggestions

Request and review Remediation Agent fixes for issues in a pull request when its quality gate fails in 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.

To fix Hunter Agent findings, use [manual backlog remediation](/sonarqube-server/user-guide/issues/with-ai-features/backlog-fix-suggestions.md#fixing-hunter-agent-findings).

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* Your project is bound to a GitHub, GitLab, or Azure DevOps repository, and the agent has write access to it. See [Binding to GitHub](/sonarqube-server/instance-administration/devops-platforms/github.md), [Binding to GitLab](/sonarqube-server/instance-administration/devops-platforms/gitlab.md), or [Binding to Azure DevOps](/sonarqube-server/instance-administration/devops-platforms/azure-devops.md).
* An LLM provider and a model are configured for the instance.
* **Manual backlog remediation** is turned on for the instance. See [Remediation Agent](/sonarqube-server/instance-administration/ai-features/remediation-agent.md#enabling-the-agent).

## Triggering the agent <a href="#triggering-the-agent" id="triggering-the-agent"></a>

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 **Fix with agent** to trigger it.

## Tracking the agent's job <a href="#tracking-the-agents-job" id="tracking-the-agents-job"></a>

To follow what the agent is doing, open **Project** > **Remediation Agent** in the project navigation. It lists each job with:

| Column                | Description                                                                                                                                                                                                                                  |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **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**.                                                                                                                                                                 |
| **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 <a href="#reviewing-the-pull-request" id="reviewing-the-pull-request"></a>

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 <a href="#reviewer-assignment" id="reviewer-assignment"></a>

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 [Remediation Agent](/sonarqube-server/instance-administration/ai-features/remediation-agent.md#reviewer-assignment-support).

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Remediation Agent](/agent-centric-development-cycle/in-your-long-living-branches-the-code-maintenance-loop/remediation-agent.md)
* [Backlog fix suggestions](/sonarqube-server/user-guide/issues/with-ai-features/backlog-fix-suggestions.md)
* [Remediation Agent](/sonarqube-server/instance-administration/ai-features/remediation-agent.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-server/user-guide/issues/with-ai-features/pull-request-fix-suggestions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
