We audited feature flags across a client's codebase after a bug turned out to be caused by two flags interacting in a combination nobody had tested, because nobody remembered the combination was still possible. Just under half the flags in that codebase were controlling features that had been fully rolled out for over a year.
Why they don't get removed
Removing a flag means someone has to be confident the old code path is genuinely dead, which requires checking rather than assuming, and that checking never feels urgent compared to the next feature. Each individual flag is a small, deferrable task. The combination is where the risk actually lives.
The specific bug
Two flags, each individually fine, controlled overlapping parts of a checkout flow. One had been fully rolled out and forgotten; the other was mid-rollout for a genuinely new audience. A user in the second group hit a code path that assumed the first flag's old behaviour, which no longer existed in the way the newer code expected, and checkout failed for a small percentage of users for several days before the pattern was noticed.
What we now do
- Every flag gets an expiry date at creation, not just a name — a point at which someone is prompted to either remove it or explicitly extend it.
- Fully-rolled-out flags are removed within a sprint, treated as a small piece of technical debt with an owner, not an optional cleanup.
- We test flag combinations that can coexist, not just each flag in isolation, once a codebase has more than a couple of active ones.
A feature flag is a temporary fork in the code that costs nothing to create and something to maintain for as long as it exists, whether or not anyone remembers it does.
What the audit found overall
Of around forty flags in that codebase, eighteen were controlling fully-rolled-out features, four were combinations nobody had explicitly tested together, and one was for a feature that had since been removed entirely, meaning the flag was dead code checking a condition that could no longer meaningfully be true.
The rule going forward
If a flag isn't in active use for a genuine rollout or a genuine experiment, it's debt, not infrastructure, and we now review the list quarterly on every project of a certain size to keep it that way.
