# Backlog fix suggestions

> **Note:** The SonarQube Remediation Agent is a [Beta](https://docs.sonarsource.com/sonarqube-cloud/appendices/product-release-lifecycle#beta) feature available with the Team (annual) and Enterprise plan accounts. It's free during the beta phase and will be a paid feature when it moves to [General Availability](https://docs.sonarsource.com/sonarqube-cloud/appendices/product-release-lifecycle#general-availability). To learn more about the terms & conditions, please see our legal page about features in [Early Access](https://www.sonarsource.com/legal/early-access/).

Assign issues to the SonarQube Remediation Agent and generate AI CodeFix suggestions in SonarQube Cloud.

*AI features are only available in SonarQube Cloud Team and Enterprise plans*. See the [Subscription plans](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-subscription/subscription-plans) page for more detail&#x73;*.*

## Assigning issues to the agent

Reduce technical debt by selecting issues from your main branch and letting the SonarQube Remediation Agent propose fixes in new pull requests (PR). The **Assign to Agent** button on the **Issues** page lets you send selected issues to the agent so it can generate a fix proposal for you to review.

The **Backlog fixes** feature runs *only on the main branch*. It must be enabled by selecting **Backlog fixes** from the **AI capabilities** page in SonarQube Cloud. For step-by-step instructions to enable the **Backlog fixes**, see the [Enable your agent](/agent-centric-development-cycle/how-to-guides/administer-ac-dc-features/remediation-agent.md#enable-your-agent) article on the SonarQube Remediation Agent page.

Only eligible issues in your main branch can be assigned to the agent. If you select a mix of eligible and non-eligible issues, a warning appears and you are reminded that only eligible issues will be sent to the service. The **Assign to Agent** button stays greyed out until at least one eligible issue is selected. For a list of unsupported rules, see the [Requirements and limitations](/agent-centric-development-cycle/how-to-guides/administer-ac-dc-features/remediation-agent.md#requirements-and-limitations) article on the SonarQube Remediation Agent page.

When you select **Assign to Agent**, the agent opens a new pull request in GitHub, authored by the SonarQube Remediation Agent. Fix suggestions are grouped together in PRs, organized by rule key and file type; one PR will be opened for each rule key and/or file type. An estimated time to fix notification will pop up and the agent's activity will be visible on the **Agent activity** page when the PR is available.

1. Navigate to your project’s **Issues** page.
2. Check that you are on the `main` branch.
3. Select issues from your backlog that you want the agent to fix.
4. Select **Assign to Agent** to send eligible issues to the SonarQube Remediation Agent.

![Select one or more issues to fix using the SonarQube Remediation Agent to fix issues in your backlog.](https://docs.sonarsource.com/~gitbook/image?url=https%3A%2F%2F2223713658-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FB4UT2GNiZKjtxFtcFAL7%252Fuploads%252Fc35RXVsNgqGeykXVTvu1%252Fsonarqube-cloud-assign-to-agent-steps.png%3Falt%3Dmedia%26token%3D702ab688-35d6-4a54-8971-5bcbee7bbeb2\&width=768\&dpr=3\&quality=100\&sign=23509ec6\&sv=2)

**Backlog fixes** are only available when addressing issues in your main branch. See the [Main branch analysis](https://docs.sonarsource.com/sonarqube-cloud/analyzing-source-code/branch-analysis/main-branch-analysis) page for information about the main branch **Summary** page.

## Reviewing agent fixes in GitHub

The PR summary (in GitHub) includes issue information in the same format you expect see in an issue’s rule description from any SonarQube product. The agent’s fix proposal is delivered in a unique commit for each issue, ready for an engineer to review.

The SonarQube Remediation Agent's PR comment will have a list of **Fixed Issues** with information that includes the issue's rule description and the accompanying information as found with every SonarQube rule.

## Agent activity <a href="#agent-activity" id="agent-activity"></a>

To review the SonarQube Remediation Agent's activity, go to *Your SonarQube Cloud Project* > **Agent activity**. From there you'll see the agent's:

* Status/duration: Time the agent spent to generate fixes.
* Started: When the agent is triggered by selecting **Fix automatically** in the **Quality Gate failed** comment on a pull request, by selecting **Assign to Agent** on the **Issues** page, or by the **Automated scheduler**.
* Source: Where the agent is working. *Backlog fixes* means that the agent is working on issues found in your main branch; or a link will be provided to the branch where you first called the agent.
* Outcome: A link to the agent's PR.
  * PRs made for *Backlog fixes* will be on your `main` branch.
  * PRs made for *Pull request fixes* will be made on your branch. See [Engage with the agent](/agent-centric-development-cycle/how-to-guides/solve-issues/pull-request-fix-suggestions.md#engage-with-the-agent) for details.

![The SonarQube Cloud Agent activity page lists each of the agent's event moments on your pull request analyses.](https://docs.sonarsource.com/~gitbook/image?url=https%3A%2F%2F2223713658-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FB4UT2GNiZKjtxFtcFAL7%252Fuploads%252Fzo0hYjsJKgxztCAKN7rG%252Fsonarqube-cloud-agent-activity.png%3Falt%3Dmedia%26token%3D84d47193-c5c7-486e-98d9-0c59d420da1d\&width=768\&dpr=3\&quality=100\&sign=98c996d1\&sv=2)

## Agents in your pull request <a href="#agents-in-your-pull-request" id="agents-in-your-pull-request"></a>

Get AI-generated fix suggestions in your pull request for Java, JavaScript/TypeScript, and Python projects when the quality gate fails with new issues introduced. See the [Pull request fix suggestions](/agent-centric-development-cycle/how-to-guides/solve-issues/pull-request-fix-suggestions.md) page for the full details.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/agent-centric-development-cycle/how-to-guides/solve-issues/backlog-fix-suggestions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
