Skip to main content

Integrate CodeRabbit into a GitHub repository that you own

Observe CodeRabbit perform a code review of a pull request that you initiate

3

>>> Converse with CodeRabbit about the code review

4

Prompt CodeRabbit to generate its own improvements to the pull request

Engage in interactive dialogue

One of CodeRabbit’s most powerful features is its ability to engage in natural, context-aware conversations about your code. Rather than just receiving static feedback, you can ask follow-up questions, request clarifications, challenge recommendations, or explore alternative approaches. This interactivity transforms code review into a collaborative dialogue, helping you understand not just what to change, but why changes are recommended.

Ask CodeRabbit for clarification

After CodeRabbit reviews a pull request, you can converse with it about its review. You can question its recommendations, ask for explanations, or request it to adjust its review approach for your project’s specific needs.
  1. Post the following as a new GitHub comment attached to the pull request:
    Chat in PR
    After a few moments, CodeRabbit posts its reply, explaining its motivations for its recommendation. The reply might resemble the following:
    You’re right that these functions are quite self-explanatory from their names alone. Docstrings aren’t strictly necessary for every function, especially in smaller projects with clear function names. While docstrings do provide benefits (IDE tooltips, documentation generation, help for future developers), they can sometimes feel redundant for very straightforward functions. It’s ultimately a matter of coding style and project requirements. If you prefer to skip docstrings for obvious utility functions in this project, that’s perfectly reasonable. Would you like me to adjust my review approach regarding documentation for this repository?
    In this case, CodeRabbit is offering to adjust its future behavior when reviewing changes to this repository. Instead, follow the next step to ask CodeRabbit to implement part of its suggestions. When CodeRabbit prepares changes in a pull request conversation or inline review thread, see Confirm and commit prepared changes to apply them to the current branch.

Verify a fix in a linked repository

On GitHub and GitLab, you can ask CodeRabbit to check a fix at an exact commit in a linked repository. For self-hosted CodeRabbit, your administrator must enable chat reference selection before you can use this workflow. Reply in the review thread with the full repository name and commit SHA, replacing the example values with your own:
Reply in the review thread
The repository must already be linked and accessible to CodeRabbit, within your plan limit. Your reply’s reference takes priority over a reference to the same repository in the pull request description. See Verifying a linked commit in chat for supported formats, selection rules and troubleshooting.

How CodeRabbit answers replies in review threads

By default, when you reply in a review thread that CodeRabbit started, CodeRabbit answers without an @coderabbitai mention. If chat.auto_reply is turned off, include @coderabbitai in the reply to get an answer. CodeRabbit stays out of the thread when your reply mentions another person but not CodeRabbit. If your reply only confirms a fix, says you’ll leave or defer the change, or closes the conversation, such as “Fixed in a1b2c3d”, “Done”, “Thanks” or “LGTM”, CodeRabbit adds a 🚀 reaction to your reply instead of writing an answer. It decides separately what happens to the thread: it resolves the thread when it can verify the fix, and leaves the thread open when you defer the change. To get a written answer, ask a question or request a change. The 🚀 reaction counts toward your chat rate limit like a written answer.

What you can discuss with CodeRabbit

CodeRabbit can engage in various types of conversations about your code:
  • Question recommendations - Ask why certain changes were suggested
  • Explore alternatives - Discuss different approaches to solving the same problem
  • Request context - Get explanations about best practices or design patterns
  • Clarify implementation details - Understand how to apply suggestions in your specific context
  • Discuss trade-offs - Explore the pros and cons of different solutions
You can mention CodeRabbit using @coderabbitai in any pull request comment to start a conversation. It understands the context of your entire pull request and can reference specific files, functions, or previous comments in its responses.

Chat rate limits

CodeRabbit limits how many chat messages each person can send in an hour. The limit comes from the plan of the organization or account that owns the repository; see the Chat column in Rate limits. Each person has a separate allowance for each repository owner, so your messages in one organization’s repositories don’t count against your allowance in another organization’s repositories.

What counts as a chat message

Each of these counts as one chat message:
  • A reply in a review thread that CodeRabbit started. Without an @coderabbitai mention, a reply counts while chat.auto_reply is on, which is the default. A reply doesn’t count when CodeRabbit is muted in the thread, or when it mentions another person but not CodeRabbit.
  • A pull request comment that mentions @coderabbitai, including commands such as @coderabbitai review.
  • An action you start by selecting a checkbox in a CodeRabbit comment, including a Fix comments run.
CodeRabbit treats @coderabbitai anywhere in a comment as a mention, including inside code formatting. A pull request comment that doesn’t mention CodeRabbit doesn’t count, and CodeRabbit doesn’t respond to it.

How the allowance resets

Chat limits use a fixed one-hour window, not a rolling one. The window starts with your first chat message, and your whole allowance comes back at once when the hour ends. While you keep chatting, each new hour starts when the previous one ends; after two hours with no chat messages, your next message starts a new window. Sending about 20 chat messages within 10 seconds in one repository also pauses chat in that repository for about a minute.

When you reach the limit

CodeRabbit replies with Rate Limit Exceeded and how long to wait. The notice appears in the review thread for a thread reply, and in the pull request conversation for a comment or checkbox action. CodeRabbit doesn’t process the message that reached the limit, and it doesn’t queue the message for later. Send it again after the wait.

Send fewer chat messages

These patterns matter most when automation or coding agents reply to CodeRabbit for you:
  • Let CodeRabbit check pushed fixes. When CodeRabbit reviews new commits, it can resolve threads whose suggestions you implemented. You don’t need to reply in those threads.
  • Address several threads in one comment. A pull request comment that mentions @coderabbitai and lists several threads counts as one chat message. CodeRabbit answers it in the pull request conversation, not in each thread.
  • Leave the mention out of comments meant for people or tools. Status notes and bot-to-bot messages that include @coderabbitai count against the limit even when they aren’t questions for CodeRabbit.
  • Spread automated replies across the hour. Because the allowance returns all at once, a burst can use the whole hour’s allowance in minutes.