Fixing issues
Fixing issues in SonarQube Cloud happens in the IDE. From the Team plan, you can get AI-suggested fixes for many code issues in your organization.
Depending on the issue, you may get fix suggestions:
In the How can I fix it? tab of the issue's detail view. See Reviewing issues for more details.
Available in the Team plan, generated through AI: see Getting AI-generated fix suggestions below.
Opening issues in your IDE
To speed up the time it takes to find and fix the issue, use connected mode to connect SonarQube Cloud with SonarQube for IDE and use the Open in IDE feature.
To open an issue in your IDE, it’s easier if you are already running in connected mode:
Follow the Retrieving issues instructions and open an issue's detail view.
Select the Open in IDE button.
Getting AI-generated fix suggestions
Sonar's AI CodeFix is available to provide AI-generated fix suggestions in the Team and Enterprise plans. See the Subscription plans page for more details. If needed, the Enable AI CodeFix page has more information for SonarQube Cloud administrators to activate the feature for your organization.
The suggestions are generated for select rules and languages using Anthropic's Claude Sonnet 4 (recommended) or OpenAI's GPT-4o.
To generate a fix suggestion in your IDE:
Simply open your project in SonarQube for SonarQube for VS Code or SonarQube for IntelliJ using connected mode with SonarQube Cloud.
In your IDE, select an issue marked with the
icon, open the Rule description >
AI CodeFix tab, and select
Generate Fix. A fix will be generated in the code editor and you’ll have a chance to Apply or Decline the suggestion.
See the IntelliJ page for AI CodeFix in your IDE
See the VS Code page for AI CodeFix in your IDE
To generate a fix suggestion in SonarQube Cloud:
Follow the Retrieving issues instructions in SonarQube Cloud and open an issue's detail view. If an AI CodeFix is an option for that particular issue, you will see the
Generate AI Fix button.
From either the Where is the Issue or the AI CodeFix tabs, select the Generate Fix button.

An AI CodeFix will be generated, and you’ll see a diff view in the AI CodeFix tab. Simply copy and paste the generated fix into your IDE; If you’re using SonarQube for IDE and have connected mode set up for SonarQube for IDE, feel free to use the Open in IDE feature to streamline the process.
If you are running SonarQube for Visual Studio, selecting View fix in IDE will offer you a diff view in the IDE which provides an opportunity to accept or reject the suggestion before committing the change.
An AI Code Assurance badge is available to any SonarQube Cloud plan to mark your AI projects as reviewed by SonarQube Cloud. Any user with project access can use the badge. For more detailed instructions, see the AI Code Assurance article on the AI settings page.
Note that for some issues, an AI CodeFix suggestion is not available. To learn more about which rules are eligible for AI CodeFix, please see the list of Rules covered with AI CodeFix.
Usage limits
Limits are placed on the AI CodeFix feature to manage abuse. Developers will be notified directly when the monthly allocation is reached for your organization. If the instance is blocked due to reaching the allowance, users attempting to generate a fix will see an error message. Usage quotas are reset on the first day of each month.
SonarQube Remediation agent
The SonarQube Remediation Agent is a Beta feature available with Enterprise plan accounts. It is free during the beta phase and will be a paid feature when it moves to General Availability. To learn more about the terms & conditions, please see our legal page about features in Early Access.
If your SonarQube Cloud organization is not on an Enterprise plan, please see the Getting started with Enterprise pages to get the process started.
The SonarQube Remediation Agent runs an independent review and analysis to help you fix reliability and maintainability issues found in your latest code. It focuses on new issues discovered in your latest GitHub pull request (PR). These issues, picked up by the agent, would otherwise break the new code conditions of your quality gate and block the merge of your PR. The generation of fix suggestions takes place in the background and the new code does not introduce new issues.
To enable and install the agent, see the SonarQube Remediation Agent page. To understand the agent's behavior and learn how to engage with the agent in your pull request, see the Agents in your GitHub pull request page.
Creating Jira Cloud work items from SonarQube issues
You can create a Jira Cloud work item from a single or multiple SonarQube issues. See Jira Cloud integration for more information.
Last updated
Was this helpful?

