GCP – Achieve better AI-powered code reviews using new memory capabilities on Gemini Code Assist
The best feedback during a code review is specific, consistent, and understands the history of a project.
However, AI code review agents today are often stateless; they have no memory of past interactions. This means you might find the same feedback on new pull requests that you’ve rejected before, because the agent can’t learn from your team’s guidance, leading to frustration and repeated work.
Today, we’re releasing a new memory capability for Gemini Code Assist on GitHub for both enterprises and individual developers. Now, you can create a dynamic, evolving memory of your team’s coding standards, style, and best practices, all derived from your direct interactions and feedback within pull requests. The memory is stored securely in a Google-managed project specific to your installation, isolating it from other users.
Here’s how memory works
Memory transforms the code review agent from a stateless tool into a long-term project contributor that learns and adapts to your team.
Automated vs. manual memory
Gemini Code Assist on GitHub already supports memory in the form of styleguide.md files. These rules are always added to the agent’s prompt, which makes it suitable for static, universal guidelines.
In contrast, persistent memory introduces a more dynamic and automated approach. It automatically extracts rules from pull request interactions, requiring no manual effort. These learned rules are stored efficiently and are only retrieved and applied when they are relevant to the specific code being reviewed. This creates a smarter, more scalable memory that adapts to your team
The process is built on three key pillars:
1. It learns from your interactions
The process begins when you and your team do what you already do today – conducting code reviews: When a pull request is merged, Gemini Code Assist on GitHub will analyze the comment threads for feedback. For instance, if Gemini Code Assist on GitHub points out that “do not line-wrap import statements” in a .java file, and the author disagrees in their comment, the agent sees this interaction as a valuable piece of feedback and will store it. By waiting until a PR is merged, we ensure the conversation is complete and the code is a valuable source of truth.
2. It intelligently creates, updates and stores rules
From that simple interaction, persistent memory uses the powerful Gemini model to infer a generalized, reusable rule. In the example above, it would generate a natural language rule like: “In Java, import statements could be line-wrapped”.
3. It applies rules to future reviews

Once rules are stored in memory, the agent uses them in two critical ways:
-
To guide the initial review: Before it even begins analyzing a new pull request, the agent will query the persistent memory for a broad set of relevant rules for the repository. This helps shape its initial analysis to be more in line with your team’s established patterns.
-
To filter its own suggestions: After generating a set of draft review comments, the agent performs a second check. It retrieves highly specific rules related to its own comments and evaluates them. This acts as a filter to ensure its suggestions don’t violate a previously learned best practice, allowing it to drop or modify comments before you ever see them.
As more rules are accrued, the team’s tribal knowledge is shared across the codebase through code reviews.
Getting started
-
New to the app?
-
If you are an individual developer or OSS maintainer, install Gemini Code Assist on GitHub from the GitHub Marketplace.
-
If you are an enterprise customer, onboard through the Google Cloud Console. Review our documentation to learn more about the setup and using the Code Review capability. See this video for a walkthrough of the process.
Already have the app installed?
-
If you are an individual developer or OSS maintainer, enable this feature in the Gemini Code Assist on the Github admin panel.
-
If you are an enterprise customer, enable this feature in the Google Cloud Console
Read More for the details.
