Vega for flag cleanup requires a connected GitHub account to create pull requests. To learn how to connect GitHub, read Connecting Vega to GitHub.
Vega is LaunchDarkly’s AI-powered agent. To learn more about Vega, including eligibility and pricing, read Vega.
Vega can help you identify and remove stale feature flags from your codebase. Stale flags accumulate technical debt, and most teams don’t clean them up because the process is manual and error-prone. Vega automates safety checks and code changes, removing the main barriers to keeping flag counts manageable.
To start a flag cleanup, you can either:


Either option opens the Flag cleanup modal, which shows a staleness analysis and lets you start the cleanup:

Once started:
Vega follows this procedure to determine whether a flag is safe to remove:
You can view a flag’s cleanup status in the Vega Cleanup Status section on the flag’s detail page sidebar:

When Vega completes a cleanup, it provides a summary including staleness analysis, code changes, and a link to the pull request:

Vega tags flags during the cleanup process. You can filter by these tags in the Flags list to track progress:
If Vega determines the flag is still active (multiple variations in use across critical environments), it will notify you and stop. If Vega cannot find the flag in your code repositories, it will also notify you.
In addition to starting cleanups manually, you can configure Vega to automatically clean up flags on a recurring schedule. When enabled, Vega periodically scans for flags that are ready for code removal and runs cleanup jobs for them.
To configure automated flag cleanup:
Go to Project settings, then select Lifecycle settings.
In the “Automated flag cleanup” section, check Enable automated flag cleanups.
Configure the following settings:
AGENTS.md file, if available.Click Save.

After you save, Vega runs cleanups automatically based on your schedule. Each run processes up to the configured maximum number of flags. You can track the progress of automated cleanups the same way as manual cleanups, using the vega-pr-in-progress, vega-pr-filed, and vega-pr-attempted tags in the Flags list.
The settings card shows a “Last configured by” indicator with the member who saved the current configuration. Automated cleanup jobs run using this member’s permissions, so Vega can only access the repositories and flags that member has access to. If that member’s permissions change or their account is deactivated, you should update the settings with a different member to ensure cleanups continue to run.
Vega currently supports GitHub only for creating pull requests. To learn how to connect GitHub, read Connecting Vega to GitHub.
CLAUDE.md or AGENTS.md file to your repository.