> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Global overrides

> Enforce CodeRabbit settings on top of every repository's configuration in an organization or workspace, and check when an override wins.

Global overrides are YAML that CodeRabbit applies on top of the resolved configuration of every repository in an organization or workspace. No repository file, central configuration or web interface setting can change an overridden value. Use them for compliance policies, not for defaults.

## What global overrides do

After CodeRabbit resolves a repository's configuration, it merges organization global overrides on top, then workspace global overrides. They apply whether or not inheritance is on, and workspace overrides win when both set the same key. After a per-review override from a pull request description or a `--with-config` comment, CodeRabbit applies global overrides again.

## Who can edit global overrides

| Scope | Where | Who can edit |
| - | - | - |
| Organization | **Review** > **Review settings** > **Organization defaults**, then set **View mode** to **Global overrides** | The Admin role, or a [custom role](https://docs.coderabbit.ai/management/custom-roles.md) with read and write access to **Organization settings** |
| SSO workspace | **Workspace management** > **CodeRabbit configuration** | Workspace admins, and users with the Admin role in any organization in the workspace |
| Self-hosted Git provider workspace | **Workspace settings** | The Admin role, or a custom role with read and write access to **Organization settings** |

Anyone with read access to **Organization settings** can view the overrides. The built-in Admin, Member and Billing Admin roles all have it. See [Role-based access](https://docs.coderabbit.ai/management/roles.md). The API can read global overrides but can't change them.

## Set global overrides

**1. Open the editor**

Open the page for your scope from the table above and set **View mode** to **Global overrides**.

**2. Write only the keys to enforce**

Use the `.coderabbit.yaml` V2 keys. Leave out everything you don't want to enforce.

**3. Save the overrides**

Select **Apply changes**, then confirm with **Apply changes** in the dialog. The overrides apply to the next review of every repository in scope. Organization global overrides don't apply while the organization has **Use workspace settings** on.

```yaml Global overrides theme={null}
reviews:
  profile: assertive
  path_instructions:
    - path: "**/*.sql"
      instructions: "Flag any statement that drops or truncates a table."
```

## How overrides merge

Objects merge key by key with the override winning. Arrays combine by key: override entries come first and replace base entries with the same key, and other base entries stay. Scalars are replaced. An empty array in an override leaves the base array as it is. See [Inheritance and merging](https://docs.coderabbit.ai/configuration/inheritance-and-merging.md#how-values-merge).

## Force inheritance everywhere

Set `inheritance: true` in a global override to make every repository in scope run the inheritance walk, including repositories that set `inheritance: false`.

```yaml Global overrides theme={null}
inheritance: true
```

## Check whether an override is winning

> [!WARNING]
>
> An override wins silently. A repository owner who changes a setting in `.coderabbit.yaml` sees no error when an override pins it.

Comment `@coderabbitai configuration` on a pull request. Values from overrides carry `# Source: Organization global overrides` or `# Source: Workspace global overrides`. The **Run configuration** section of **Review info** lists them under **Enforced overrides**. See [Check which configuration a review used](https://docs.coderabbit.ai/configuration/guides/check-effective-configuration.md).

## Limits

* Overrides use configuration schema V2. In organizations on the V3 settings preview, the V2 overrides editor doesn't save changes.
* When an organization has **Use workspace settings** on, its own organization global overrides are ignored.
* Self-hosted CodeRabbit has no global overrides at either scope.

## What's next

> [card] [Enforce settings teams can't change](https://docs.coderabbit.ai/configuration/guides/enforce.md)
>
> Plan which settings to enforce and roll them out without surprising teams.

> [card] [How CodeRabbit resolves configuration](https://docs.coderabbit.ai/configuration/resolution.md)
>
> See where global overrides sit among every other layer.

> [card] [Inheritance and merging](https://docs.coderabbit.ai/configuration/inheritance-and-merging.md)
>
> Compare how overrides, inheritance and workspace defaults merge values.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.