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

# Scopes

> Use scopes to control which Slack conversations can access which repositories, connections, and spend limits in CodeRabbit Agent for Slack.

Scopes control which repositories, [connections](/slack-agent/connections), and spend limits CodeRabbit Agent for Slack can use in each conversation. Every workspace has a **Base Scope** that applies everywhere by default. Scopes let you override or extend those defaults for specific channels or DMs.

## Start with the Base Scope

The Base Scope is created during the [Quickstart](/slack-agent/onboarding) setup flow. It sets the default repositories, connections, and monthly spend limit per user. Scopes build on top of it by adding repositories, swapping connections, or setting tighter limits. If a conversation does not match any scope, the Base Scope governs it entirely.

## One scope per conversation

For any given conversation, CodeRabbit Agent resolves:

1. The **Base Scope**, which always applies
2. At most one matching **scope**, when the current channel or DM pattern matches one

That means the Base Scope is the workspace-wide baseline and a scope is the targeted override or extension for that specific Slack surface.

<Warning>
  If more than one scope matches the same conversation, CodeRabbit Agent treats the match as **ambiguous and blocks the request** rather than guessing. Ensure scope patterns do not overlap.
</Warning>

## Scope types

| Scope type | Use it for                                            | What it controls                                                   |
| ---------- | ----------------------------------------------------- | ------------------------------------------------------------------ |
| Base Scope | Workspace-wide defaults                               | Default repositories, connections, and spend limit                 |
| Scope      | Targeted access for specific channels or DM workflows | Channel- or DM-specific repositories, connections, and spend rules |

## Inheritance rules

Scopes build on top of the Base Scope.

| Behavior            | How it works                                                                                                                                                                              |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Repositories        | A scope inherits the Base Scope repositories, then adds any extra repositories selected in that scope                                                                                     |
| Non-MCP connections | A scope keeps the Base Scope service choice unless the same service is explicitly replaced. Only **one** connection per non-MCP service type is allowed per scope. Duplicates are blocked |
| MCP connections     | MCP connections are additive, so scope-level MCP access combines with Base Scope MCP access. Duplicate MCP server selections are also blocked                                             |
| Spend limit         | A scope can inherit the Base Scope baseline or set a narrower or different policy                                                                                                         |

In practice, the effective repository set is usually the union of Base Scope repositories and scope repositories.

## Spend controls

Spend controls are configured at the scope level.

| Scope type | Blank value behavior                      | Explicit unlimited behavior |
| ---------- | ----------------------------------------- | --------------------------- |
| Base Scope | Defaults to a baseline when left blank    | Set **No limit** explicitly |
| Scope      | Inherits or remains unset when left blank | Set **No limit** explicitly |

Use scope spend limits when a team, channel, or workflow should be more tightly controlled than the workspace default.

Spend enforcement uses the same **agent minutes** metric shown in [Usage](/slack-agent/usage). Each run records how long the Agent spent working, and longer runs consume more of a scope's monthly spend budget than shorter runs.

## Scope admins

Scopes can be managed by assigned **scope admins**, but the **Base Scope** remains reserved for global admins.

That lets workspace admins delegate day-to-day scope tuning without giving every scope owner control over the entire CodeRabbit Agent workspace.

## Roll out safely

For most teams, the safest rollout path is:

1. Keep the Base Scope relatively conservative
2. Add scopes only where a team needs different repositories, tools, or limits
3. Expand gradually as usage patterns become clearer

## What's next

<CardGroup cols={1}>
  <Card title="Connections" href="/slack-agent/connections" icon="plug" horizontal>
    Learn how workspace-level connections are created once and then selected per scope.
  </Card>

  <Card title="Admin roles and security" href="/slack-agent/admin-and-security" icon="lock" horizontal>
    See who can create scopes, who can edit them, and who can see activity across the workspace.
  </Card>

  <Card title="Working in Slack" href="/slack-agent/use-in-slack" icon="messages-square" horizontal>
    Understand how the current scope changes what CodeRabbit Agent can do in a real conversation.
  </Card>
</CardGroup>
