Skip to main content
Detail’s Dead Code agent detects unused symbols, functions, and files in your codebase and automatically opens GitHub pull requests to remove them. Instead of scheduling a manual cleanup sprint, you get a steady stream of small, focused PRs that keep your codebase lean — and if your CI pipeline catches an issue with a removal, a follow-up agent pushes a fix automatically.

How it works

1

Agent analyzes the repository

The Dead Code agent scans your repository looking for symbols — functions, classes, variables, modules — that have no callers or importers anywhere in the codebase. It only flags code it can verify is truly unreferenced.
2

Pull requests are opened

For each batch of dead code found, the agent opens a GitHub pull request containing the removal patch. The PR description explains what was removed and why it was identified as dead code.
3

CI failures are handled automatically

If your CI pipeline fails on a dead-code removal PR, the Pass-CI agent automatically pushes an updated commit to fix the issue. You don’t need to intervene unless you want to review the changes yourself.
4

You review and merge

Treat the PR like any other: review the diff, leave comments, request changes, or merge. You stay in full control of what lands in your main branch.

Enabling dead code scanning

1

Open repository settings

In the Detail dashboard, go to Settings → Repositories and select the repository you want to configure.
2

Enable Dead Code

Toggle Dead Code to on. The agent will run on the next scheduled scan.
3

Configure the schedule

Choose how often you want the agent to run. Scans can be scheduled nightly, weekly, or on weekdays only.

What to expect

Batched PRs

Removals are grouped into batches to keep each PR reviewable. You won’t receive a single massive PR deleting thousands of lines at once.

Clear PR descriptions

Each PR includes a description explaining which symbols were removed, why they were considered dead, and where they were located in the codebase.

Automatic CI fixes

If the removal PR breaks CI, the Pass-CI agent pushes a follow-up fix commit. The PR stays open and ready for your review.

Full GitHub workflow

Dead code PRs live in GitHub like any other PR. You can review, comment, request changes, merge, or close them — no special tooling required.
Dead code removal is safe. The agent only removes symbols it can verify have no references anywhere in the repository. If there is any ambiguity — for example, dynamic dispatch or reflection-based access — the agent leaves the code in place.