# Delete a dead flag and every reference to it

Delete a dead flag and every reference to it: Name the flag that always resolves one way now. Get it and its dead branch removed.

Source: https://codeherder.com/starter-briefs/delete-a-dead-flag/

Starter briefs

Name the flag that always resolves one way now. Get it and its dead branch removed.

[Request access →](https://codeherder.com/get-started/#request-access) [Part of: Run the routine chores →](https://codeherder.com/use-cases/run-the-routine-chores/)

## The brief

Copy this text as it is, or change the specifics to match your own case, then file it as a task.

Copy this and file it as a task

Copy brief

```
This feature flag has resolved the same way for a long time now and doesn't need to exist anymore. Remove the flag, delete the code path it always skips, and clean up every place that still checks it, including any config or test setup that references it. Keep the behavior the flag currently produces; just stop it being conditional.
```

## Why this works

It names one flag and states the invariant that keeps the change safe: the resulting behavior must match what the flag already produces today. That gives a reviewer a precise thing to check the diff against, so nothing is left to a judgment call.

How it runs

## Plan, code, review, merge, verify

1. plan Finds every reference to the flag across code, config, or test setup, then confirms which branch it always takes now.
2. code Removes the flag, deletes the dead branch, and simplifies every call site that checked it.
3. review Confirms the resulting behavior matches exactly what the flag already produced, with no branch left half-removed.
4. merge Opens a pull request that removes only the one flag.
5. verify Confirms no reference to the flag remains and behavior is unchanged.

## What you need on hand

- The flag's name and which value it has resolved to for a while
- Every place that references it: in code, in config, or in tests
- A person to confirm the surviving behavior matches the flag's current resolved state

## Done when

- No code, config, or test still references the flag
- The behavior it used to gate is unchanged
- The dead branch it used to skip is truly gone, no longer just unreachable

## Proof, not a promise

No real task in examples.ts matches this brief's exact shape yet. What's real is the mechanism: an agent finds every reference to a flag before touching it, so removing it also removes the dead branch instead of leaving an orphaned check nobody notices.

Keep going

## Related briefs

[Add a filter to a list we already have Name the list and what you want to narrow it by, and get a working filter control for it.](https://codeherder.com/starter-briefs/add-a-filter-to-a-list/) [Bump one dependency and fix what breaks Name the dependency and the version, and get an upgrade with whatever it breaks already fixed.](https://codeherder.com/starter-briefs/bump-one-dependency/) [Pull one duplicated block into one place Point at the same logic copied into more than one place, and get it merged into one shared version.](https://codeherder.com/starter-briefs/pull-duplicated-code-into-one-place/)

[← See every brief](https://codeherder.com/starter-briefs)
