My coding agent hides dead code. This 7-second check finds it all.
timhartmann7 · reddit · 2026-09-02
The author identifies dead code accumulation as a major failure mode in agent-generated repositories. The solution involves adding a fifth acceptance criterion: the dead code report must show nothing new for the touched files. The workflow compares baseline and post-agent reports, deleting or wiring up any new additions. To prevent the agent from bypassing checks via ignore comments or config edits, strict rules are enforced. The post details tooling stacks for TypeScript (knip), Rust (cargo shear), Go (deadcode), and Python (ruff/vulture/deptry), along with practices like freezing data contracts to prevent naming drift.
More from coding & agent
- Agentic engineering koan: A GPU dreaming of an engineer? — charles_irl · 2026-09-02
- Agentic engineering irony: engineers must think like GPUs — charles_irl · 2026-09-02
- MapQuest launches MCP server to power AI agents with location and routing data — deliprao · 2026-09-02
- Fable 5.1 boosts stability for long-running agent tasks — minchoi · 2026-09-02
- Reef Open-Sourced: An Inference Server That Continually Learns and Self-Improves Your Agents — pliang279 · 2026-09-02
- Ethan Mollick Proposes 'Facilitator Agents' to Decide Human Intervention — rseroter · 2026-09-02