---
title: Permanent and Stale Gates
description: Learn how to manage feature gates lifecycle with Types to track flags ready for cleanup or permanent integration
product: general
token_estimate: 1430
---
# Permanent and Stale Gates

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

Feature gate **Types** in Statsig track which flags are ready for cleanup and which should stay in your codebase permanently. Statsig marks a gate **Stale** when it looks ready to remove, and you mark a gate **Permanent** when it needs to live in your codebase long-term. Use these Types to bring gates to a final state after they have served their purpose, as described in [Feature Gate lifecycle](https://docs.statsig.com/feature-flags/feature-flags-lifecycle).

## Types

In your feature gates catalog, different **Types** appear in the Status column and under the filter option:

![Feature gates catalog with status types filter](https://docs.statsig.com/images/feature-flags/permanent-and-stale-gates/224765362-9b9686f2-62b0-4605-8b8c-911987d343e0.png)

- **Permanent Gates** (set by you)

  - **Permanent feature gates** typically live in your codebase for an extended period, beyond a feature release, usually for operations or infrastructure control. Common examples include user permissions, circuit breakers or disable switches, and support for legacy features in old app versions. User permissions can gate premium features based on subscription level, and circuit breakers or disable switches can end a connection to prevent negative customer impact.

    - There are two ways to mark a gate as **Permanent**:

      - When creating the gate: the **Permanent** box in the gate creation flow

        ![Permanent checkbox in gate creation flow](https://docs.statsig.com/images/feature-flags/permanent-and-stale-gates/224768058-1a1b74a2-6b5d-4bfd-b73c-e2fc1f4a7a7f.png)
      - After creating the gate: click on the "..." menu and then "Mark Gate Permanent"

        ![Mark Gate Permanent menu option](https://docs.statsig.com/images/feature-flags/permanent-and-stale-gates/224763304-2002e482-8ef0-4025-b13c-acb92ffb2bcc.png)
  - Implications of marking a gate as **Permanent**

    - No change in the gate's behavior when called
    - Easy filtering on feature gates catalog
    - More caution in its management: while you can archive or delete a **permanent** feature gate, Statsig shows a warning before proceeding
    - Statsig foregoes reminding you to clean up these gates and may display them differently in the console
  - You can change the gate back to **Temporary** at any point.

    - All newly created feature gates default to **Temporary**, unless you mark them as Permanent. Statsig doesn't display the phrase **Temporary** in the feature gates Catalog or within the individual gates page.
- **Stale Gates** (set by Statsig)

  - **Stale feature gates** indicate to your team that these gates could be good candidates for cleanup. Statsig automatically marks gates as stale based on the following criteria (excludes Permanent and archived gates):

    - Gates created less than 30 days ago, modified in the last 30 days, or referenced by other gates, experiments, or dynamic configs never become stale
    - Otherwise, any of the following conditions make a gate stale:

      - The gate has had 0 checks within last 30 days
      - The gate still receives checks, but its earliest check was at least 30 days ago
  - Implications of Statsig marking a gate as **Stale**

    - No change in the gate's behavior when called
    - Easy filtering on Feature Gates catalog
    - Statsig includes the gate in nudges for cleanup (more below)
  - **Stale Reasons** are the reason Statsig marked a gate as stale. You can query this information on the [Console API](https://docs.statsig.com/console-api/introduction).

    - **None** No Stale Gates should have a reason of None; this value is exclusively for **Temporary** or **Permanent** gates.
    - **STALE\_PROBABLY\_DEAD\_CHECK** There have been no checks in the last 30 days.
    - **STALE\_PROBABLY\_LAUNCHED** The Gate is marked as launched or has an everyone rule passing 100% (rollout rate of 100%).
    - **STALE\_PROBABLY\_UNLAUNCHED** The Gate is marked as disabled or has an everyone rule passing 0% (rollout rate of 0%).
    - **STALE\_PROBABLY\_FORGOTTEN** This gate appears to have been only partially launched for some time. Consider launching or disabling it, or marking it permanent if you still need it.
    - **STALE\_NO\_RULES** The Gate has no set rules.
    - **STALE\_ALL\_TRUE** The Gate has been returning true on every check for the last 30 days (or number of days configured in project settings). You could probably remove it.
    - **STALE\_ALL\_FALSE** The Gate has been returning false on every check for the last 30 days (or number of days configured in project settings). You could probably remove it.
    - **STALE\_EMPTY\_CHECKS** The Gate has been returning empty (probably indicating an error) on every check for the last 30 days (or number of days configured in project settings). You could probably remove it, or you might need to investigate it.

## Nudges to clean up stale gates

Using the **Stale** type, Statsig provides both in-console and external nudges to remind you to clean up (or make Permanent) your feature gates.

- **In-console:** A reminder appears at the top of the individual feature gate page.

  ![Stale gate cleanup reminder notification](https://docs.statsig.com/images/feature-flags/permanent-and-stale-gates/224457644-16844256-e7f8-4490-b07e-74f0d85eb6ee.png)
- **Email/Slack:** Statsig sends a monthly email or Slack reminder (if you have enabled the Slack integration) to clean up or mark permanent any stale gates you own. Reminders continue until the gates are cleaned up or marked as permanent.

