earlyink
226 first flagged23 Oct 2026

Flag Sweep: agent-written cleanup PRs for stale feature flags

A GitHub app that finds fully rolled-out flags and opens tested removal PRs. Startup engineering teams pay per repo.

Crowded · DoorDash paper: 1,659 stale flags

Written for: Solo builder

Next step

This week, build a CLI that pulls 100%-rollout flags from the PostHog or GrowthBook API, finds their references with ripgrep, and has a coding model draft one removal diff per flag. Recruit five testers from the PostHog and GrowthBook community Slacks.

Why now

Until now this was a recipe only big companies could build in-house. The paper shows the approach works at scale, coding models are cheap enough to draft a diff per flag, and the flag platforms (PostHog, GrowthBook, Unleash, LaunchDarkly) expose rollout status through APIs. Teams of 20 to 200 engineers carry the same debt without a platform team to fix it.

What became possible

DoorDash published an industrial report on cleaning up feature flags with a multi-agent LLM system. It has 56,000 flags across 623 repos, 1,659 of them stale, and each takes one to two hours to remove by hand. The paper says existing rule-based cleanup tools fall short.

Two ways in

  1. Flag Sweep GitHub App

    Reads the flag platform's API for flags at 100% rollout for 30+ days, finds code references, removes the dead branch, runs the test suite and opens a PR explaining what changed.

    Customer
    Series A–C startups using PostHog, GrowthBook or LaunchDarkly
    Model
    $20 per repo per month, or $5 per merged PR
  2. flagsweep OSS CLI

    Local, open-source version for self-hosted GrowthBook and Unleash users. It doubles as the funnel for the paid app.

    Customer
    Individual engineers stuck with flag cleanup
    Model
    Free, with an upgrade path to the hosted app

Competition

Crowded

The core loop is taken. Finding fully rolled-out flags, removing the dead branch, running tests and opening a PR is now offered free or bundled by the flag vendors (LaunchDarkly Vega, Reflag, Harness, Unleash's MCP workflow, PostHog's docs), by FlagShark as a free GitHub Action, and by open source (bye-bye-flag for PostHog, Uber Piranha).

Full competition notes (12 competitors)

The core loop is taken. Finding fully rolled-out flags, removing the dead branch, running tests and opening a PR is now offered free or bundled by the flag vendors (LaunchDarkly Vega, Reflag, Harness, Unleash's MCP workflow, PostHog's docs), by FlagShark as a free GitHub Action, and by open source (bye-bye-flag for PostHog, Uber Piranha). The proposed OSS CLI in particular has a near-exact existing equivalent in bye-bye-flag. The remaining opening is narrow. GrowthBook turned up no specific tooling, so a provider-neutral app covering GrowthBook, PostHog and Unleash together, including self-hosted setups, is a possible wedge. To justify charging per repo, a new entrant would need to stand out on safety rather than on opening the PR. That means verifying in production that the flag is no longer being evaluated, finding references across several repos and across client and server code, checking that tests actually exercise the branch being kept, and cleaning up leftover config, tests and the flag record. Even then, pricing pressure from free tools and features bundled into the platforms makes a standalone paid product hard to sustain for Series A to C startups.

Checked 2026-10-23

Risks

  • LaunchDarkly or PostHog can ship cleanup as a built-in feature
  • A wrong branch removal causes an outage, so trust takes a while to earn
  • Small teams may have too few flags to feel the pain

Strong team fit; market pull and open space are the weak point (6).

tech 7 · pull 6 · space 6 · fit 8 · build 7

Exposed

Companies that could benefit or be threatened. News and context, not investment advice.

Momentum of its main topic

174 developments this week +27 vs last week
24 Sep: 0 developments25 Sep: 0 developments26 Sep: 0 developments27 Sep: 0 developments28 Sep: 0 developments29 Sep: 0 developments30 Sep: 0 developments1 Oct: 0 developments2 Oct: 0 developments3 Oct: 0 developments4 Oct: 0 developments5 Oct: 0 developments6 Oct: 0 developments7 Oct: 0 developments8 Oct: 32 developments9 Oct: 26 developments10 Oct: 13 developments11 Oct: 11 developments12 Oct: 14 developments13 Oct: 19 developments14 Oct: 24 developments15 Oct: 35 developments16 Oct: 31 developments17 Oct: 15 developments18 Oct: 14 developments19 Oct: 23 developments20 Oct: 26 developments21 Oct: 36 developments22 Oct: 30 developments23 Oct: 30 developments
Stage: Coverage

Sources

  1. Automating Feature Flag Cleanup at Scale with Multi-Agent LLM Systems: An Industrial Experience at DoorDasharXiv

Status history

  • 2026-10-23 Flagged as buildable