Jump to Content
AI & Machine Learning

Achieve better AI-powered code reviews using new memory capabilities on Gemini Code Assist

November 10, 2025
Hadi Minooei

GenAI Software Engineer

Umair Idris

Staff Software Engineer

Try Gemini 2.5

Our most intelligent model is now available on Vertex AI

Try now

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

https://storage.googleapis.com/gweb-cloudblog-publish/images/image1_ifNxRxg.max-1100x1100.png

Once rules are stored in memory, the agent uses them in two critical ways:

  1. 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.

  2. 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

Posted in