Start your free trial
Verify all code. Find and fix issues faster with SonarQube.
EmpezarAI coding agents like Cursor and Claude Code are changing how we build software, but they often work in a vacuum. They don’t automatically understand your project’s specific rules, architectural boundaries, or code security standards. As a result, they can generate code that works in isolation but fails to integrate cleanly into your broader codebase. This leads to rework, higher costs, and a "trial-and-error" process for software developers.
Today, we are excited to announce the beta of Sonar Context Augmentation to bridge this gap.
What is Sonar Context Augmentation?
Sonar Context Augmentation is a service that injects real-time, deep knowledge from SonarQube directly into your AI agent’s workflow. It uses the SonarQube MCP Server to act as a bridge between your enterprise codebase and your AI coding tools.
By providing this "repo-aware" context, Context Augmentation helps AI coding agents understand the specific environment they are working in before they ever generate a line of code.
How Sonar Context Augmentation works
Sonar Context Augmentation provides the exact, filtered information an AI agent needs to get the job right on the first try:
- Dynamic context guidelines: Instead of overwhelming an agent with thousands of rules, Context Augmentation identifies the most relevant coding standards based on what you are asking and the history of the specific files being modified.
- Architectural awareness: It gives the agent a structural map of your code, including class hierarchies and function flows, so it respects your intended code architecture and avoids creating technical debt.
- Smarter search: Agents can find specific code sections using exact signatures and body patterns rather than simple text matches, leading to more accurate modifications.
Why context matters
When an agent has the right context, the agentic output is more accurate, faster, and carries less risk for long-term architectural drift. Our early benchmarks are showing an increase of 10% in build pass rates, and a 20% increase for test pass rates. Code duplication is reduced by 40%, and code outputs have 43% less cognitive complexity. All of this matters for achieving the real productivity promise of AIgen code.
Our benchmarking also shows that when an agent has the right context, it doesn't just write better code—it works more efficiently. Organizations using Context Augmentation can expect to see reduction in token usage, tool calls, and overall AI operating costs, in particular when working in complex code bases.
By defining the "rules of engagement" upfront, developers spend less time fixing AI-generated code errors and more time shipping high-quality software.
Join the beta
The Sonar Context Augmentation beta is available starting today, for Java projects. To participate, you will need:
- SonarQube Cloud Enterprise plan
- SonarQube MCP Server
- An AI agent like Cursor, Copilot or Claude Code
Please contact us with your SonarQube Cloud enterprise organization id to join the beta and explore how agents like Cursor and Claude Code can follow your organization’s specific standards from the first prompt.
Thanks!

