In plain words
A feature flag is a setting your code checks while it runs to decide whether to show a feature, so you can ship code switched off, turn it on for some users, and turn it off again in seconds.
Where you see it
Harbor's new file-sharing page merges to main behind a flag called file-sharing-v2, managed in a service such as LaunchDarkly, Unleash or PostHog. It goes on for the team first, then 5% of customers, then everyone, and when uploads start failing at 20%, someone switches it off without waiting for a deploy.
What goes wrong
- Flags that never get removed
A year later the code is full of flag checks nobody dares delete, and some combinations were never tested. Give each flag an owner and a removal date, and delete it once the feature is fully on.
- Hiding a feature only in the browser
A flag checked only in the React component hides the button, but the API route still works for anyone who calls it. Check the flag on the server too.
- Deciding per request instead of per user
If the flag rolls the dice on every request, a user sees the new page, then the old one, then the new. Bucket by user or team id so each one gets a steady answer.
What to tell your agent
Quick check
Sign in to earn +10 XP for itHarbor's new billing page is behind a flag, switched on for 10% of teams. Errors spike. What's the fastest safe response?