Skip to main content
Configuration inheritance allows you to share common settings across repositories while still allowing individual repositories to customize specific values. When enabled, CodeRabbit merges configuration from parent levels instead of using only the highest-priority source.
Inheritance is disabled by default. You must explicitly enable it by adding inheritance: true to your configuration file.

Enabling inheritance

Add inheritance: true at the root level of your .coderabbit.yaml file:
When inheritance is enabled:
  1. CodeRabbit merges values from the parent configuration level
  2. If the parent also has inheritance: true, the chain continues to the grandparent level
  3. The chain stops at the first level where inheritance:false or not set

Configuration hierarchy

CodeRabbit resolves configuration from multiple levels. Without inheritance, only the highest-priority source is used. With inheritance enabled, values merge across levels.

Cloud/SaaS deployment

PrioritySourceLocation
0 (Highest)Workspace global overridesCodeRabbit UI - Workspace Settings - Global Overrides (Enterprise workspace customers)
1Organization global overridesCodeRabbit UI - Organization Settings - Global Overrides
2Repository YAML.coderabbit.yaml in the repository
3Central YAML.coderabbit.yaml in coderabbit repository
4Repository UICodeRabbit UI - Repository Settings
5Organization UICodeRabbit UI - Organization Settings
6Workspace UICodeRabbit UI - Workspace Settings (Enterprise workspace customers)
7 (Lowest)DefaultsCodeRabbit schema defaults
Global overrides are applied as the final merge layer, after the inheritance chain has been resolved, and take precedence over every other source. For Enterprise workspace customers, Workspace Settings provide the lowest configuration level above defaults, and workspace global overrides apply after organization global overrides. See Global overrides for details.

Self-hosted deployment

How inheritance works

When you enable inheritance, CodeRabbit walks up the configuration hierarchy and merges values. The merge behavior depends on the data type.

How the inheritance chain works

  • Each level with inheritance: true merges with its parent
  • The chain stops at the first level where inheritance:false or unset
  • Missing configuration levels are skipped automatically

Merge behavior by type

Example

This example demonstrates all three merge behaviors. Repository configuration (.coderabbit.yaml):
Central configuration (coderabbit/.coderabbit.yaml):
Merged result:
The src/** path instruction from central is excluded because the repository already defines the same path. Arrays deduplicate using the first available stable key: path, label, name, id, or key.

Verifying inherited configuration

After enabling inheritance, run @coderabbitai configuration on any pull request to see the fully-resolved YAML annotated with source comments. Each setting shows where it came from, so you can trace exactly which level in the merge chain supplied each value. The command identifies these sources:
  • Repository YAML β€” .coderabbit.yaml in the repository
  • Central YAML β€” .coderabbit.yaml in the coderabbit repository
  • Environment YAML β€” YAML_CONFIG environment variable (self-hosted only)
  • Repository UI β€” CodeRabbit UI repository settings
  • Organization UI β€” CodeRabbit UI organization settings
  • Workspace UI β€” CodeRabbit UI workspace settings (enterprise only)
  • Defaults β€” CodeRabbit schema defaults
  • Global overrides β€” organization or workspace overrides (enterprise only)
See the @coderabbitai configuration command reference for usage details.

Common use cases

Organization-wide defaults

Set up common settings in your central coderabbit repository, then enable inheritance in individual repositories to use those defaults while customizing specific values. Central configuration (organization/coderabbit/.coderabbit.yaml):
Repository configuration (organization/my-repo/.coderabbit.yaml):
The repository inherits all central settings but uses an assertive review profile and adds API-specific instructions.

Team-specific configurations (GitLab)

GitLab’s nested group structure allows team-specific configurations. Each team can have their own coderabbit repository with settings that inherit from parent groups.
Each level can enable inheritance to merge with its parent while adding team-specific customizations.