tl;dr: Detail can now detect dead code in your codebase and open pull requests to remove it. To enable, go to Dead Code in the Detail dashboard , select a repository, and enable it.
Every codebase accumulates dead code. Products evolve, features get reworked, a refactor orphans a helper, an experiment gets rolled back and a stray endpoint stays behind. Dead code silently raises the cost of every future change by distracting and confusing the agents that write our software. And agents prolifically generate it.
Now Detail finds it for you, and opens the PRs to clean it up.
How it works
Detail scans your repository for code that is safe to delete: unused functions, symbols, entire files, endpoints. For each item of potentially dead code, Detail determines when it was last used, to confirm there was an identifiable moment when it became dead. When Detail finds dead code, it opens a pull request with the removal patch and an explanation.
Detail is conservative by design. Deleting code is only useful if you can trust the deletions, so Detail only flags code it can verify is unreferenced โ and only after it’s been dead for a minimum amount of time. A function that went unused yesterday might be part of work in flight; Detail leaves it alone.
Every PR makes its own case. The PR description explains what was removed, when it was introduced, when it became unused, and why Detail is sure it’s safe to remove. Reviewing a Dead Code PR shouldn’t require archaeology โ the evidence is in the description.
PRs go to someone with context. Detail routes each PR to the engineer who has context on the dead code, so review is fast. If you’d rather route everything through one person, you can configure a single reviewer for all Dead Code PRs.
CI failures get fixed automatically. If your pipeline catches an issue with a removal, Detail updates the PR on its own. Likewise, if an engineer requests a change to a Dead Code PR, Detail will update the PR.
You stay in control. Nothing lands without review. Treat the PR like any other: review, request changes, or merge.
How much dead code is out there?
A lot more than we expected. We’ve been running Dead Code with beta customers for the past month.
- A typical codebase with 10k files has an average of 37k lines of dead code that Detail can identify and remove.
- Across beta customer repositories, 14% of files had dead code. Average deletion size was 27 lines of code.
Enabling it
- In the Detail dashboard , go to Dead Code and select the repository you want to enable.
- Follow the flow to enable it. You can schedule scans daily or weekly, set a maximum number of PRs to open per day, and optionally specify a single reviewer for all Dead Code PRs.
That’s it. PRs will start showing up in your review queue โ a steady stream of small, focused deletions that keep your codebase lean.