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.-
Post the following as a new GitHub comment attached to the pull request:
After a few moments, CodeRabbit posts its reply, explaining its motivations for its recommendation. The reply might resemble the following:Chat in PR
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
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
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
@coderabbitaimention, a reply counts whilechat.auto_replyis 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.
@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
@coderabbitaiand 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
@coderabbitaicount 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.