TLDR overview
- Remediation campaigns in SonarQube Cloud let the SonarQube Remediation Agent work through related backlog issues in steps, then combine the changes in one final pull request (PR) for your team to review.
- Choose the issues, give the agent a goal, or let it start with the most severe eligible issues.
- The agent works on a separate campaign branch. Nothing reaches your main branch until you merge the final PR.
- Campaigns work with GitHub-bound projects and need a separate Remediation Agent subscription on the Team (annual) or Enterprise plan.
Your teams ship more code than ever. The backlog of known issues still waits for a sprint that never comes.
Those issues stay in your main branch, and every new change builds on top of them. Each one is a maintenance cost and a risk you already know about.
The SonarQube Remediation Agent already fixes issues on demand or on a schedule. Remediation campaigns add a third way to work. Point the agent at a body of related issues, and it works through them in steps and hands you one final PR to review.
Remediation campaigns are now available in SonarQube Cloud for GitHub-bound projects.
What are Remediation campaigns?
A Remediation campaign is a guided run of the agent against the backlog in your main branch. You set the scope and add optional instructions. The agent plans the work and carries it out in steps:
- You create the campaign. Select issues, describe a goal, or leave both empty and let the agent start with the most severe eligible issues.
- The agent prepares and starts. It selects eligible issues and plans the steps. You do not need to approve the plan or each step of PR.
- The agent works one step at a time. Each step that produces changes opens a PR into a separate campaign branch. The agent can merge that step PR into the branch and continue from the updated code. A step that cannot produce a fix is skipped or closed, and the campaign keeps going.
- The agent opens one final PR. It opens the PR after the first step merges and updates it as more steps finish.
- You review and merge. The final PR carries the combined changes. Your main branch changes only when you merge it.

Each fix goes through closed-loop verification. The agent re-runs Sonar's analysis engine against the modified code, and only fixes that resolve the original issue without introducing new ones become pull requests. SonarQube is the independent verification layer. It raises the issue, and it re-checks the fix.
How do I set up Remediation campaigns?
Your organization admin does this once. The steps follow the Administer the Remediation Agent documentation.
- Check your LLM option. Your subscription decides whether the agent uses a Sonar-provided LLM or your own OpenAI or Anthropic API key. The Sonar-provided option needs no provider account. The Remediation Agent entry under Billing and usage shows which option your organization uses.
- Add your key (BYOK only). Go to your organization, then Administration > AI capabilities > LLM API Keys. Choose OpenAI or Anthropic, enter the key and a name, and select Add key. SonarQube Cloud verifies the key with your provider before it saves it. You can add up to three keys.
- Install the SonarQube Agent GitHub app. Go to Administration > AI capabilities > Remediation Agent and select GitHub under Install app. A GitHub administrator installs the SonarQube Agent app on the GitHub organization linked to your SonarQube Cloud organization, chooses All repositories or Only select repositories, and select Install & Authorize. The app gets read and write access to code and pull requests, read-only access to Actions, and read-only access to issues and metadata.
- Select your key (BYOK only). Under Choose your key, select the key you added. The agent stays disabled until you select a valid key.
- Enable the workflow. Under Enable agent, enable Manual backlog remediation. For GitHub-bound projects, this setting also controls whether you can start Remediation campaigns. Select Save.

You keep control of access. A GitHub administrator can change repository access, or suspend or uninstall the app, at any time. Sonar processes the affected code to generate and verify each fix. For details on how your code is handled with each LLM option, see Sharing your code with Sonar.
How do I start a campaign?
- Open your project's Issues page and select the main branch.
- To fix specific issues, select them in the issues list.

- Select Start a campaign.
- Under Recommended issues to be fixed, select the scope you want. Leave every checkbox cleared to use the whole backlog.
- Optionally, under Specify instructions for the agent, describe a goal in up to 1,800 characters.
- Select Create campaign.

- It will show you the progress window.

- Open View progress to follow the campaign.
The scope options work like this:
A campaign targets up to 200 eligible issues, grouped into steps. Choosing the whole backlog does not mean the agent includes or fixes every issue. With no scope and no instructions, the agent starts with the most severe eligible issues in your backlog. The campaign starts automatically after preparation.
How do I follow a campaign?
Open your project's Agent activity page and find the entry with Campaign as its source. Expand it to see the steps and links to their PRs. Check each step's outcome and any explanation of why the agent skipped or closed it. Steps that close without merging are not part of the campaign's result.
Look for these outcomes on the entry:
- Completed. Open the final PR to review the result.
- Completed, no changes. No step produced a change for a final PR.
- Could not be prepared. Read the explanation on the entry before you try again.

How do I review and merge the fixes?
The agent opens the final PR after the first step merges and updates it as more steps finish. While the campaign runs, the PR title starts with [In progress] and its description asks you not to merge yet. Wait for the campaign to finish before you review the complete result.
When the campaign ends, the PR description summarizes the issues and steps in the result. It links each step's PR and commit, or explains why the agent closed the step. Check the Result and Not done lines for work that still needs attention.
- Open the final PR from Agent activity.
- Review the proposed changes and the summary of step outcomes.
- If you need changes, post review comments on the final PR. The agent follows up on eligible comments. It pushes a follow-up commit when a comment points to a real problem, and it replies to the comments it addresses. Review comment follow-up lists which comments qualify.
- Merge the PR when you are satisfied with the changes and it meets your repository's requirements.
- Check the next main branch analysis to confirm which issues are resolved. If analysis does not run automatically, run your usual main branch analysis.
A completed campaign does not mean the agent fixed every targeted issue or that every quality gate condition passes. The next analysis tells you where you stand.
Why use a campaign?
- Review once. The final PR description summarizes the issues and steps in the result. It links each step's PR and commit, or explains why the agent closed the step. Your reviewers see the full outcome in one place, and your team can trace every change to its step.
- Direct the work in plain language. Give the agent a goal in up to 1,800 characters, such as
Fix null pointer issues in the billing module. You steer the work without picking every issue yourself. - Keep control. The agent merges step PRs into the campaign branch only. You merge the final PR, and you can stop a campaign at any time. Your main branch changes when you decide.
What do I need to get started?
- A Remediation Agent subscription. The agent needs a separate subscription to your SonarQube Cloud Team (annual) or Enterprise plan. To trial or purchase it, contact our Sales team.
- A private project bound to GitHub. The project's main branch must have an analysis.
- Admin setup. An organization admin enables Manual backlog remediation, selects a valid large language model (LLM) provider key if your subscription uses bring your own key (BYOK), and gives the SonarQube Agent GitHub app access to the repository. The next section covers each step.
- Usage allowance. Your organization needs the remaining Remediation Agent usage allowance.
- Your access. You are a member of the SonarQube Cloud organization with Browse permission on the project.
Campaigns select eligible issues with an Open or Confirmed status. They support Java, JavaScript/TypeScript, Python, C, C++, C#, PHP, and secrets. They can also include eligible SonarQube Hunter Agent findings, regardless of language. Generating those findings requires a separate Hunter Agent subscription on your Enterprise plan. To see how the agent fixes them, read our blog post on the SonarQube Remediation Agent and Hunter Agent findings.
From known issue to merged change
Remediation campaigns run in the code maintenance loop of the Agent Centric Development Cycle (AC/DC), the loop that keeps improving the code you already have. SonarQube verifies your code and raises the issues. The SonarQube Remediation Agent handles the Solve stage. It generates fixes and re-verifies each one before it reaches a reviewer. Your team keeps the decision that matters, which is what merges.
To get started, read Remediation campaigns in the SonarQube Cloud documentation. To trial or purchase the SonarQube Remediation Agent, contact our Sales team.

