Definition

Feature Flag

A feature flag is a software development technique that allows a specific feature to be enabled or disabled at runtime through a configuration toggle, without requiring a new code deployment.

Understanding Feature Flag

Feature flags give developers and product teams control over which features are visible to which users. A new feature can be deployed to production but initially hidden behind a flag, then gradually enabled for a percentage of users, specific user segments, or individual testers. If the feature causes problems, it can be instantly disabled without rolling back the entire deployment.

For vibecoded applications, feature flags are particularly useful because they reduce the risk of each release. When AI-generated code is deployed, there is always uncertainty about how it will behave in production. Feature flags let you deploy new functionality in a controlled way, minimizing the blast radius if something goes wrong.

Testing with feature flags requires checking the application in both states: with the flag on and with the flag off. It also requires verifying that toggling the flag does not cause issues like cached state conflicts or incomplete data migrations. QA testers should test both the new experience and confirm that the existing experience remains unaffected when the flag is off.

Example usage

We used a feature flag to gradually roll out the new dashboard to 10% of users. When QA found a bug, we turned off the flag instantly while we fixed it.

Related terms

Learn more