Enable Release Autopilot for a repository
Release Autopilot runs only on repositories that you map to a LaunchDarkly project. A repository that is not mapped never runs. Enabling a repository gives your team flag proposals on its pull requests, and gives you control over which projects receive the flags that Release Autopilot creates. To enable Release Autopilot for a repository:- Install the LaunchDarkly GitHub app. To learn how, read Install the app.
- Click the project dropdown and select Project settings in the LaunchDarkly project where Release Autopilot creates flags.
- Select Automations. The “Automations” page appears.
- Turn on the switch in the “Auto-flagging” or “Auto-releasing” section. Auto-flagging proposes a flag for new code in a pull request. Auto-releasing rolls out the flag.
- Turn on the switch for the repository.
- Click Save in the section.
Work with proposals
Release Autopilot posts a proposal on each pull request that it analyzes. The following sections explain how to read a proposal, what drives its recommendation, how to respond to it, and which commands you can use. Release Autopilot recommends a flag when a change affects users. This means the change ships with a gradual rollout and a way to turn it off without a redeploy. It recommends against a flag when nothing in production would notice the change, which keeps flag clutter and cleanup work low. Each recommendation follows the criteria in the should-flag-change skill, a set of instructions that guides how the agent evaluates a change. Release Autopilot reads the diff and the surrounding code, then judges what the change does in production and for whom. Line count does not matter. For example, a one-line change to an authentication check carries more weight than a large rename.Read a proposal
A proposal is the comment that Release Autopilot posts on your pull request. It gives a plain-language summary of the analysis and names the flag that Release Autopilot wants to create and why. The recommendation in a proposal reaches one of four outcomes:| Outcome | Meaning |
|---|---|
suggested | Release Autopilot recommends a new flag. |
reuse-existing | An existing flag already controls the same unreleased feature, which means the change should use that flag instead of a new one. The recommendation identifies the flag to reuse. |
already-flagged | A flag already protects the change, either through a flag check in the diff or through a flag that already surrounds the code and is off or partway through a rollout. The change needs no new flag. |
not-suited | The change is not suited for a flag because there is nothing to flag, such as a pure refactor, a docs change, a test change, or a build change with no user-observable behavior change. |
should-flag-change skill reports. The GitHub app records the same outcomes as suggest_new_flag, reuse_existing_flag, already_flagged, and no_flag_needed. The GitHub app has one more outcome, ask_human, for when Release Autopilot needs to ask you a question before it can decide.
The recommendation also includes the following details:
- Confidence is low, medium, or high. Confidence describes how clear the decision is, not how strongly Release Autopilot holds its conclusion. Release Autopilot never reports a borderline change with high confidence.
- Risk is low, medium, or high. Risk describes how much of your system the change can affect. Low risk is a small, isolated change that adds code without changing existing behavior. Medium risk is modified business logic. High risk is a cross-cutting change, an API contract change, a data migration, or a change to authentication, payments, or data integrity.
- Reasons are the specific files, symbols, and behaviors that Release Autopilot observed. If repository guidance shaped the recommendation, the reasons specify the source.
What drives a recommendation
Release Autopilot recommends a flag when a change does any of the following:- Adds a new user-facing path, such as an endpoint, a screen, or a flow.
- Changes behavior on a live production path, such as authentication, payments, permissions, data writes, pricing, or rate limits.
- Is part of a phased migration, such as running old and new code side by side.
- Is performance-sensitive or changes a frequently run code path.
- Alters a critical subsystem that many other parts of your code depend on.
- Depends on another feature that is not yet live.
- A pure refactor with no behavior change.
- A test-only change.
- A change to documentation or comments.
- A dependency update with no behavior change where your code uses it.
- An internal rename or generated change.
- A build, continuous integration, or tooling change that does not affect runtime.
- Missing a risky change costs more than flagging a safe one. For an uncertain change on a live, user-facing path, Release Autopilot leans toward recommending a flag and reports lower confidence.
- Before it recommends against a flag, Release Autopilot asks whether a user on a live path that no flag controls would notice a difference. It can still recommend against a flag for a small visible change that it judges low risk, such as a new button. To ask for a flag, reply
@launchdarkly replanwith the reason, or set a low-overhead posture in repository guidance. - Release posture describes how readily your team adds flags. When a change is equally likely to need a flag or not, Release Autopilot uses your posture to decide. The default conservative posture favors no flag. Teams that automate releases and flag cleanup can use a low-overhead posture, which favors a flag for customer-visible changes. You can set the posture in repository guidance.
Respond to a proposal
Release Autopilot creates the flag and puts the code behind it only after you approve. A proposal that no one approves does not create a flag. Reply to the comment with one of the following commands:- To approve the flag and the release together, reply
@launchdarkly approve. - To approve the flag first, reply
@launchdarkly approve flag. Reply@launchdarkly approve releaseafterward to start the release. - To reject the proposal, reply
@launchdarkly reject. - To change the details of the proposal, reply
@launchdarkly refinefollowed by the change you want. - To start over with a new analysis, reply
@launchdarkly replan. Add text after the command to give the new analysis context. - To tell Release Autopilot how it did, reply
@launchdarkly feedback. For example,@launchdarkly feedback inaccurate this change only touches test fixtures.
Commands you can use on a pull request
Start a comment with@launchdarkly, then add a command. For example, @launchdarkly approve. Commands are not case sensitive, and you can follow the mention with a space, a comma, or a colon.
Commands bypass approval workflows at general availabilityAt general availability, these commands apply changes without going through the approval workflows that you configure for flags. To learn more about approval workflows, read Approvals.
| Command | What it does |
|---|---|
claim | Takes ownership of the pull request. Release Autopilot can then manage a feature flag and release on your behalf. |
approve | Approves everything in the current proposal and has Release Autopilot proceed. approve all does the same. On a new proposal, it approves the flag and the release together. After approve flag, it approves the release that remains. |
reject | Rejects the current proposal. |
approve flag | Approves only the flag in the proposal. Release Autopilot creates the flag and puts the changes in the pull request behind it. It does not configure or start a release. |
approve release | Approves the release in the proposal. Release Autopilot configures and starts the release after you deploy the pull request. This command is available after the flag exists, either because the pull request already referenced a flag or because you ran approve flag. When the flag does not exist yet, use approve instead. |
revert | Reverts the current proposal. |
feedback | Records your feedback on how Release Autopilot did on the pull request. You can start with accurate or inaccurate to add a rating, followed by free text. |
refine | Asks Release Autopilot to revise the current proposal. Add the change you want, for example @launchdarkly refine use a boolean flag instead of a string flag. A refine command with no text prompts you for an instruction. |
plan | Continues the most recent analysis of the pull request. When no analysis exists yet, it starts one, which is the same analysis that runs when a pull request opens. |
replan | Starts a new analysis and discards the current proposal. Release Autopilot passes text after the command to the new analysis as context, for example @launchdarkly replan this needs its own flag. |
help | Lists every command. Run @launchdarkly help <command> for detail on one command. |
-
Every command except
helprequires a GitHub account that is connected to LaunchDarkly. When your account is not connected, Release Autopilot prompts you to connect it. -
The following commands accept no extra text:
claimapproverejectapprove flagapprove releaserevertplan
@launchdarkly approve the flag but remove the config, Release Autopilot treats the comment as a free-form request and sends the whole message to the agent that analyzes your pull request instead of running the command. -
Release Autopilot acts only on comments that address it at the start of a paragraph. It ignores a mention in the middle of a sentence, in a quote, in a list item, or in a code block. It also ignores a mention that continues with a hyphen, a period, or a slash, such as
@launchdarkly-ci,@launchdarkly., or@launchdarkly/platform. -
Release Autopilot always accepts the
@launchdarklymention, regardless of the name of the GitHub App installed for your organization. -
Only
helpandfeedbackrun on a pull request that is merged or closed.
Change Release Autopilot behavior for your repository
Release Autopilot reads repository guidance that you write in plain Markdown. Guidance helps Release Autopilot make recommendations that match your team’s conventions, so recommendations are more relevant and need fewer refinements. Guidance is optional. Without it, Release Autopilot uses the default criteria.Where Release Autopilot looks for guidance
Release Autopilot reads guidance from the following sources, in this order:- A dedicated LaunchDarkly Markdown file. This is a Markdown file with
launchdarklyin its name, or any Markdown file in a.launchdarklydirectory. - A repository flagging skill. This is a skill in your repository that describes your own flagging conventions. Skills that LaunchDarkly publishes, such as skills for creating or cleaning up flags, do not count as repository guidance.
- The flag-related sections of
AGENTS.mdorCLAUDE.md. Release Autopilot reads sections under a heading that mentions “flag,” “launchdarkly,” or “feature toggle.”
AGENTS.md or CLAUDE.md section. Release Autopilot names the sources it used in the reasons for its recommendation, so you can confirm which guidance shaped the recommendation.
What guidance can set
Guidance can set the following:- Release posture, either conservative or low-overhead
- Flag SDK usage, such as the function names and wrappers your code uses to evaluate flags
- Generated or excluded paths, which Release Autopilot treats as not suited for a flag
- The environments your team uses
- How to resolve the rollout state of a flag that surrounds a change
- Flag naming and shape conventions
- Local rules about changes to always flag or never flag
Example guidance file
Here is an example of a file namedlaunchdarkly.md at the root of a repository:
Monitor flag lifecycle updates
Release Autopilot keeps the people who own a flag informed, and LaunchDarkly records agent actions so you can review them later. The following sections explain who receives notifications and where agent actions appear in the change history.Who gets notified about flag lifecycle updates
Flag maintainers receive notifications about a flag’s lifecycle, so the people who own a flag stay informed as a release progresses without watching a dashboard. The member who made the change does not receive these notifications. You receive notifications for any flag that you maintain, including rollouts that you did not start. Release Autopilot notifies flag maintainers in the following cases:- A rollout starts.
- A regression is detected.
- A rollout completes.
Where AI agent actions appear in the change history
LaunchDarkly records the actions that AI agents take on your flags and other resources in the change history. The change history was previously called the audit log, and the REST API still uses that name. Use the change history to review what changed, where, and when. To find AI agent actions in the change history:- Click the clock icon from any page. The “Change history” dialog appears, filtered by the page you opened it from.
- In the “Filter by resource” section, choose the resources to include, such as Flag or Release pipeline.
- Filter by project, environment, and action to narrow the results.
- Click the four-arrow expand icon on an entry to view its details.
Drive releases from your own AI agent
You can manage releases and monitor guarded releases from your own AI agent through the LaunchDarkly Model Context Protocol (MCP) server and the command line interface (CLI). This lets you build release workflows that fit your team, and it keeps release status available to agents without a trip to the browser. Your agent can answer questions such as which flags are partway through a release, which are not progressing and why, and which rolled back. Your AI client is the application that connects your agent to the MCP server, such as Cursor or Claude Code. Consider the following when you connect an AI agent:- The MCP server acts with the permissions of the member who authorizes it. Connect as a member whose base role grants only the access your agent needs.
- The MCP server sends LaunchDarkly data to your AI model provider.
- Review the actions that your AI client asks the MCP server to run before it runs them, especially actions that change data.
- The hosted MCP server is not available in federal environments or the European Union instance. Use the local MCP server instead.
Troubleshoot common problems
This section answers questions that came up while LaunchDarkly teams and design partners tested Release Autopilot.Why a command does not run
When a command does not run, check the following:- The comment starts with
@launchdarklyat the beginning of a paragraph, and the command matches one in the commands table. - Your GitHub account is connected to LaunchDarkly.
- The pull request is still open.
- The command is the entire instruction. Extra text turns the comment into a free-form request.
- The flag already exists when you reply
approve release. When the flag does not exist yet, reply@launchdarkly approveinstead.
@launchdarkly help to list every command, or @launchdarkly help <command> for detail on one command. To learn more about the rules for commands, read Commands you can use on a pull request.
Why a change that is already behind a flag still gets a recommendation
Release Autopilot reportsalready-flagged when a change sits inside a flag that is off or partway through a rollout, because that flag already protects the change.
Release Autopilot judges the following cases on the criteria instead, and they usually produce a recommendation:
- The flag that surrounds the code is fully launched, so it no longer protects the change.
- The surrounding gate is a permanent switch that controls access, such as a plan entitlement, and not a rollout flag.
Why a local AI agent and Release Autopilot reach different conclusions
Release Autopilot judges a borderline change on its merits, so two analyses of the same change can reach different conclusions. Release Autopilot reports borderline changes with low or medium confidence, and the reasons show how close the decision was. To make results more consistent, put your team’s posture, flag SDK usage, and excluded paths in repository guidance. Release Autopilot reads this guidance before it decides. To learn more, read Where Release Autopilot looks for guidance.Why Release Autopilot cannot identify your LaunchDarkly member
Release Autopilot must match the GitHub login on a pull request to a LaunchDarkly member before it can act on your behalf. Two comments describe the two cases:- A comment that asks you to connect your GitHub account means that Release Autopilot recognized your GitHub login but found no matching LaunchDarkly member. Connect your account, then run your command again.
- A comment that says Release Autopilot cannot tell whose identity to use means that it found no human owner. This can happen when an automation account or a coding agent opened the pull request. Reply
@launchdarkly claimto take ownership. The member who claims the pull request becomes its owner.